#get the path to the currunt file.Assuming python code and C code to be
#executed are in same Folder
base=os.path.dirname(os.path.dirname(__file__))
path=os.path.join(base,"python")
#we have to get drive:
base=base.split(':')
base=base[0];
I am trying to write a code to c
was nignx faster than running on Apache as default setting?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are sub
interesting. How did you run the test on Apache and share us how you did tweak
apache setting to boost the performance?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Repor
It looks like you're returning a Rows object, which of course is just going
to provide the fields of each record. If you need a custom schema, you will
have to generate that yourself. You can loop through the Rows and convert
each record to the structure required. You can then pass that to
gene
Hi,
Using the REST service, a GET doesn't show the fields from auth_signature.
Is there a way to make them visible from the REST api?
Mike
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2
Hi,
I'm trying to build an application with ember.js as frontend and web2py as
backend. Ember requires a valid json:api (http://jsonapi.org/) interface.
I tried to use the generic json view but the output is different.
Example output from generic json view:
{"data": [{
"name": "100",
"fi
The args and vars contain information which can be processed in your
controller function. Typically args contain essential info required for
the function, and vars contain arbitrary variables which are passed in
addition.
In this URL: /emailer/default/caller/1?var1=kk&var2=joe
the number 1 w
It is for unpacking argument lists. See this link for more info:
https://docs.python.org/2/tutorial/controlflow.html#unpacking-argument-lists
On Sunday, 17 April 2016 15:17:25 UTC+1, Kenneth wrote:
>
> Hi Richard,
>
> Quick question on your reply, how do you use ** as prefix of form.vars?
> I'v
yeah i put the bracket wrongly. so whats the difference between the args
and the vars and when do we use each of them?
On Sunday, April 17, 2016 at 9:32:20 PM UTC+5:30, villas wrote:
>
> I do not see how this line is valid...
>
> URL('default','caller',args=row.id), [kk, joe])
>
> The brackets do
I do not see how this line is valid...
URL('default','caller',args=row.id), [kk, joe])
The brackets do not match?
Vars are normally expressed as a dict. Something like this in your
template might make more sense.
{{ myvars = {'var1':'kk', 'var2':'joe'} }}
{{=A('Call Us', _href= URL('default
< a href="{{=URL('default','caller',args=row.id), [kk, joe])}}">Call us
what is difference between performance of row.id and kk, joe. what is the
exact difference between request.args and request.vars as here? when do we
use each of that? they look interchangeable to me.
--
Resources:
- http:/
thank you Leonel and Niphlod!
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"
great tip!
i have a question on passing form variables through ajax, can i pass form.vars
if i want to pass all variables including 'q' inbox?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/
Hi Richard,
Quick question on your reply, how do you use ** as prefix of form.vars?
I've seen it in the book but never knew what it was for.
Ken
On Saturday, April 16, 2016 at 12:09:39 PM UTC-4, Richard wrote:
>
> Hello Jack,
>
> You mean you want to pass the id of the inserted record to anothe
request.args are all the URL path components after your function's name.
request.vars are all the parameters in the request
example
http://127.0.0.1:8000/welcome/default/index/1?message=hey
args will have = ["1"]
vars will have {'message': 'hey'}
It's in the book
http://www.web2py.com/books/defa
example?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
if auth.user_id <1:
redirect(URL('default','index'), client_side=True)
Why this isn't working?
On Sunday, April 17, 2016 at 3:37:31 PM UTC+5:30, Leonel Câmara wrote:
>
> add client_side=True to the redirect calls
>
> redirect("http://google.com";, client_side=True)
>
--
Resources:
- http
Can you explain what you're trying to do and why you need to concatenate
Rows instead of say using a query that gets all the results you want in one
go.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.goog
we can do sort through this ,thanks for that .but we can't limit the no of
projects to be displayed for the pagination
On Sunday, 17 April 2016 15:38:53 UTC+5:30, Leonel Câmara wrote:
>
> You can use the Rows sort method.
>
>
> http://www.web2py.com/books/default/chapter/29/06/the-database-abstr
You can use the Rows sort method.
http://www.web2py.com/books/default/chapter/29/06/the-database-abstraction-layer#find--exclude--sort
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/iss
I have concatenated two Rows objects in controller by Row1 | Row2.Now i am
not able to order them in required sorted way and i am able to achieve
pagination also.can anyone suggest something regarding this
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://githu
add client_side=True to the redirect calls
redirect("http://google.com";, client_side=True)
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received
I don't understand the question. Can you be more clear? What are you trying
to do?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this mess
what's the syntax?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-user
I am in the wilds of France with very little access to Internet. Will continue
in one week. Great support as ever Niphlod. Thanks
Peter
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/i
def data():
if auth.user_id==0:
redirect("http://google.com";)
rows=0
if request.vars.q:
db.chats.insert(shouter=auth.user and auth.user.first_name,
msg=request.vars.q)
size=len(db(db.chats.id>0).select())
lower=size-8
if size-8<=0:
l
26 matches
Mail list logo