[web2py] How to track where the MySql error 2014 is occuring?

2013-01-23 Thread Saurabh Kumar
Hi,

I have a Web2py app running on Mysql. In my apache logs, I get to see a lot 
of mysql errors (error code 2014):
Exception _mysql_exceptions.ProgrammingError: (2014, "Commands out of sync; 
you can't run this command now")

How should I proceed to track which part of the code is causing this bug? 
Are there any guidelines to follow to avoid this bug?

Thanks,
Saurabh

-- 





[web2py] Re: SQLFORM.factory and uploaded files. where is the link?

2013-01-23 Thread Paolo valleri
add upload=URL('default', 'download') should solve the problem.
Paolo

On Thursday, January 24, 2013 12:11:33 AM UTC+1, Ramos wrote:
>
> Hello 
> I dont know how to show the link to the uploaded files using 
> SQLFORM.factory
>
>
> my code
>
>
> form=SQLFORM.factory(db.trabalhador,db.t_docs,
> submit_button="Gravar",
> 
> fields=['nome','bi','ncart','ncartval','apt_medica','apt_medicaval','val_formacao','f_doc'],
> table_name='trabalhador')
>
>
> and in my view on of the fields "apt_medica" is an upload type field.
>
> It does not show the link to get the file.
>
>
> How to show it?
>
> Thank you
>

-- 





[web2py] Re: Register action using info from POST

2013-01-23 Thread Anthony
Or an easier option is to use the 
auth.get_or_create_user()method,
 though that doesn't provide the password verification 
field/validation that the auth.register() function includes (which you may 
not want anyway).

Anthony

On Wednesday, January 23, 2013 11:45:15 PM UTC-5, Anthony wrote:
>
> You might consider looking at the auth.register() code: 
> http://code.google.com/p/web2py/source/browse/gluon/tools.py#2168
>
> Another option might be to generate an auth.register() form and send the 
> formkey to the client to be passed back as a hidden field in the POST call. 
> You can then let the web2py auth.register() function handle the 
> registration as usual.
>
> If you use a web2py view to create the register form, you can do:
>
>  />
> 
>
> Otherwise, you can make an Ajax request to get a formkey:
>
> def get_formkey():
> return auth.register().formkey
>
> That will put the formkey in the session, and when the form is submitted, 
> the submitted formkey value will be compared to the value in the session. 
> Note, you also need to send a "_formname" field with the value "register".
>
> Your register function could then be:
>
> def register():
> auth.register()
> return 'An error occurred'
>
> Note, by default, if the registration is accepted, that will do a 
> client-side redirect to auth.settings.register_next (assuming web2py.js is 
> loaded in the client). If you don't want a redirect, you can define an 
> onaccept function that raises an HTTP 
> exceptionin 
> order to return a string:
>
> def register():
> def success(form):
> raise HTTP(200, 'Success')
> auth.register(onaccept=success)
> return 'An error occurred'
>
> This is untested, so I may have missed something.
>
> Anthony
>
> On Wednesday, January 23, 2013 6:11:26 PM UTC-5, Mark Li wrote:
>>
>> I have decided to use validate_and_insert with web2py's REST methods
>>
>> db.auth_user.validate_and_insert(**fields)
>>
>> Testing so far, I was able to add a user even though the email and 
>> password fields were empty in the POST call. I altered my api action so 
>> that it checks whether or not the email and password fields in the request 
>> are empty. All other validators seem to be working fine.
>>
>> If anyone has previous experience with validate_and_insert with the 
>> auth_user table, and knows of any registration holes this way, please let 
>> me know!
>>
>>
>> On Tuesday, January 22, 2013 6:50:06 PM UTC-8, Mark Li wrote:
>>>
>>> I am currently using web2py's auth to return a registration form.
>>>
>>> However, I would also like users to be able to register RESTfully, with 
>>> the email and password information in a POST call. How would I write a 
>>> register action that mimics auth.register(), except the information is from 
>>> a POST, not a form.
>>>
>>

-- 





[web2py] Re: Register action using info from POST

2013-01-23 Thread Anthony
You might consider looking at the auth.register() code: 
http://code.google.com/p/web2py/source/browse/gluon/tools.py#2168

Another option might be to generate an auth.register() form and send the 
formkey to the client to be passed back as a hidden field in the POST call. 
You can then let the web2py auth.register() function handle the 
registration as usual.

If you use a web2py view to create the register form, you can do:




Otherwise, you can make an Ajax request to get a formkey:

def get_formkey():
return auth.register().formkey

That will put the formkey in the session, and when the form is submitted, 
the submitted formkey value will be compared to the value in the session. 
Note, you also need to send a "_formname" field with the value "register".

Your register function could then be:

def register():
auth.register()
return 'An error occurred'

Note, by default, if the registration is accepted, that will do a 
client-side redirect to auth.settings.register_next (assuming web2py.js is 
loaded in the client). If you don't want a redirect, you can define an 
onaccept function that raises an HTTP 
exceptionin 
order to return a string:

def register():
def success(form):
raise HTTP(200, 'Success')
auth.register(onaccept=success)
return 'An error occurred'

This is untested, so I may have missed something.

Anthony

On Wednesday, January 23, 2013 6:11:26 PM UTC-5, Mark Li wrote:
>
> I have decided to use validate_and_insert with web2py's REST methods
>
> db.auth_user.validate_and_insert(**fields)
>
> Testing so far, I was able to add a user even though the email and 
> password fields were empty in the POST call. I altered my api action so 
> that it checks whether or not the email and password fields in the request 
> are empty. All other validators seem to be working fine.
>
> If anyone has previous experience with validate_and_insert with the 
> auth_user table, and knows of any registration holes this way, please let 
> me know!
>
>
> On Tuesday, January 22, 2013 6:50:06 PM UTC-8, Mark Li wrote:
>>
>> I am currently using web2py's auth to return a registration form.
>>
>> However, I would also like users to be able to register RESTfully, with 
>> the email and password information in a POST call. How would I write a 
>> register action that mimics auth.register(), except the information is from 
>> a POST, not a form.
>>
>

-- 





[web2py] Re: Displaying form errors after successful submission?

2013-01-23 Thread Anthony
If you want to check the credit card before accepting the form and 
inserting the record into the db, you might consider an 
onvalidationfunction
 instead. Otherwise, if you just want to add an error message to a 
particular form field, you can do form.errors.fieldname = 'error message'. 
You might consider delivering a different error message depending on 
whether the card is declined or there is some other exception thrown when 
running the make_payment code.

Anthony

On Wednesday, January 23, 2013 10:16:57 PM UTC-5, Ragtime AllTime wrote:
>
>  I think I may be going about this wrong, but I want to throw new form 
> errors if something happens after doing form.accepts(...). I'm not using 
> SQLFORM or CRUD, just the FORM().
>
> The scenario is something like this: The user enters payment information 
> correctly, but when I charge the card, the card is returned declined. Then, 
> the form should display an error saying that there are errors with the card 
> and present the user with the form again, as though validation had failed. 
> The same flow would go with emailing the user too.
>
>
> form = FORM(...)
>
> if form.accepts(request, session):
> try:
>  makePayment()
>  redirect(URL('successful_payment'))   # Redirect after success
> except ...
>  # Display Errors on form here and show the form to the user.
>
> elif form.errors:   # Validation has failed
> response.flash = 'form has errors'
>
>
>
> What would go in the except block?
>

-- 





[web2py] Re: Displaying form errors after successful submission?

2013-01-23 Thread Ragtime AllTime
I think I got it: I can use onvalidate and set the form.errors when the 
exception is tripped. That way, the form is never successfully submitted.

Although now I have the problem where the form errors are displayed twice 
for fields that have their own validate function set.

For example, setting the "requires=IS_INT_IN_RANGE(1,100)" for an INPUT() 
will show up twice. Once underneath the input tag, and again in the html 
where I set {{=BEAUTIFY(form.errors)}}

How would I disable the error display underneath the input tag?

On Wednesday, January 23, 2013 10:16:57 PM UTC-5, Ragtime AllTime wrote:
>
>  I think I may be going about this wrong, but I want to throw new form 
> errors if something happens after doing form.accepts(...). I'm not using 
> SQLFORM or CRUD, just the FORM().
>
> The scenario is something like this: The user enters payment information 
> correctly, but when I charge the card, the card is returned declined. Then, 
> the form should display an error saying that there are errors with the card 
> and present the user with the form again, as though validation had failed. 
> The same flow would go with emailing the user too.
>
>
> form = FORM(...)
>
> if form.accepts(request, session):
> try:
>  makePayment()
>  redirect(URL('successful_payment'))   # Redirect after success
> except ...
>  # Display Errors on form here and show the form to the user.
>
> elif form.errors:   # Validation has failed
> response.flash = 'form has errors'
>
>
>
> What would go in the except block?
>

-- 





Re: [web2py] How to put both login and register forms on one page...

2013-01-23 Thread Bruno Rocha
return dict(register=auth.register() , login=auth.login())

{{=register}}

{{=login}}
Em 23/01/2013 20:39, "sasogeek"  escreveu:

> how do I put the login and register forms on one page... so that a user is
> logged in if they click the login button (if they've entered correct email
> and password) and are signed up if they click the register button with form
> data for a new account?
>
> --
>
>
>
>

-- 





[web2py] Re: How do I change meta tags on each page ?

2013-01-23 Thread GeeksRule
Found it !
I've to set all my links as data-ajax="false" to avoid the links sharing 
the same meta-tags !

On Wednesday, 23 January 2013 22:18:19 UTC-5, GeeksRule wrote:
>
> This is interesting !
> I think the problem is happening since a new page is actually not getting 
> generated when I click on a link -- Jquery-Mobile ??
> When a link is being clicked I see that the resulting URL is 
> http://domain.com/*#*/function/9025
> That "*#*" probably means a link on the same page !! not a new page !
> When I type in the url without the *#*, all my meta-tags etc. get loaded 
> correctly !!!
>
> Anyone has any clue about this mystery ?!
>
>
> On Wednesday, 23 January 2013 22:11:54 UTC-5, GeeksRule wrote:
>>
>> If I change the meta-tags in the layout, then all pages have the same 
>> meta-tag values.
>>
>> I want to change the content inside the meta tags for each page.
>> e.g. *description* or the *og:title*
>>
>> e.g. 
>> But when I do the above, it change the *response.description* on the 
>> main page and after that it remains the same for the rest of the pages even 
>> though I'm setting *response.description* in each controller function.
>>
>> *Note *: I'm using *jquery-mobile* plugin - not sure if that matters.
>>
>> I'm sure I'm missing something simple here..
>>
>

-- 





[web2py] Re: How do I change meta tags on each page ?

2013-01-23 Thread GeeksRule
This is interesting !
I think the problem is happening since a new page is actually not getting 
generated when I click on a link -- Jquery-Mobile ??
When a link is being clicked I see that the resulting URL is 
http://domain.com/*#*/function/9025
That "*#*" probably means a link on the same page !! not a new page !
When I type in the url without the *#*, all my meta-tags etc. get loaded 
correctly !!!

Anyone has any clue about this mystery ?!


On Wednesday, 23 January 2013 22:11:54 UTC-5, GeeksRule wrote:
>
> If I change the meta-tags in the layout, then all pages have the same 
> meta-tag values.
>
> I want to change the content inside the meta tags for each page.
> e.g. *description* or the *og:title*
>
> e.g. 
> But when I do the above, it change the *response.description* on the main 
> page and after that it remains the same for the rest of the pages even 
> though I'm setting *response.description* in each controller function.
>
> *Note *: I'm using *jquery-mobile* plugin - not sure if that matters.
>
> I'm sure I'm missing something simple here..
>

-- 





[web2py] Displaying form errors after successful submission?

2013-01-23 Thread Ragtime AllTime
 I think I may be going about this wrong, but I want to throw new form 
errors if something happens after doing form.accepts(...). I'm not using 
SQLFORM or CRUD, just the FORM().

The scenario is something like this: The user enters payment information 
correctly, but when I charge the card, the card is returned declined. Then, 
the form should display an error saying that there are errors with the card 
and present the user with the form again, as though validation had failed. 
The same flow would go with emailing the user too.


form = FORM(...)

if form.accepts(request, session):
try:
 makePayment()
 redirect(URL('successful_payment'))   # Redirect after success
except ...
 # Display Errors on form here and show the form to the user.

elif form.errors:   # Validation has failed
response.flash = 'form has errors'



What would go in the except block?

-- 





[web2py] How do I change meta tags on each page ?

2013-01-23 Thread GeeksRule
If I change the meta-tags in the layout, then all pages have the same 
meta-tag values.

I want to change the content inside the meta tags for each page.
e.g. *description* or the *og:title*

e.g. 
But when I do the above, it change the *response.description* on the main 
page and after that it remains the same for the rest of the pages even 
though I'm setting *response.description* in each controller function.

*Note *: I'm using *jquery-mobile* plugin - not sure if that matters.

I'm sure I'm missing something simple here..

-- 





[web2py] error in alwaydata ?

2013-01-23 Thread samuel bonilla
i am trying this command in alwaysdata hosting with ssh, for up my web2py 
application, but i get this error:

http://forum.alwaysdata.com/viewtopic.php?id=1859

chmod +x web2py/web2py.fcgi
chmod: cannot acess 'web2py/web2py.fcgi' : no such file or directory


help me ?

-- 





[web2py] Re: Auth login with Firefox

2013-01-23 Thread villas
Still struggling with Firefox login. When I render the built-in login form, 
 the formkey should be the same as that which is saved in the session file. 
 

At least I think that is what is supposed to happen.  It seems to happen OK 
with other browsers.

Using Firefox the keys are different and this causes the login form post to 
be rejected.  What could be going wrong?

-- 





[web2py] SQLFORM.factory and uploaded files. where is the link?

2013-01-23 Thread António Ramos
Hello
I dont know how to show the link to the uploaded files using SQLFORM.factory


my code


form=SQLFORM.factory(db.trabalhador,db.t_docs,
submit_button="Gravar",

fields=['nome','bi','ncart','ncartval','apt_medica','apt_medicaval','val_formacao','f_doc'],
table_name='trabalhador')


and in my view on of the fields "apt_medica" is an upload type field.

It does not show the link to get the file.


How to show it?

Thank you

-- 





[web2py] Re: Register action using info from POST

2013-01-23 Thread Mark Li
I have decided to use validate_and_insert with web2py's REST methods

db.auth_user.validate_and_insert(**fields)

Testing so far, I was able to add a user even though the email and password 
fields were empty in the POST call. I altered my api action so that it 
checks whether or not the email and password fields in the request are 
empty. All other validators seem to be working fine.

If anyone has previous experience with validate_and_insert with the 
auth_user table, and knows of any registration holes this way, please let 
me know!


On Tuesday, January 22, 2013 6:50:06 PM UTC-8, Mark Li wrote:
>
> I am currently using web2py's auth to return a registration form.
>
> However, I would also like users to be able to register RESTfully, with 
> the email and password information in a POST call. How would I write a 
> register action that mimics auth.register(), except the information is from 
> a POST, not a form.
>

-- 





[web2py] Re: Sqlform.smartgrid does not show link to uploaded file

2013-01-23 Thread António Ramos
Please delete this post, if possible. the subject is wrong. Its
SQLFORM.factory does not show link to uploaded files

2013/1/23 António Ramos 

> Hello
>
> my code
>
>
> form=SQLFORM.factory(db.trabalhador,db.t_docs,
> submit_button="Gravar",
>
> fields=['nome','bi','ncart','ncartval','apt_medica','apt_medicaval','val_formacao','f_doc'],
> table_name='trabalhador')
>
>
> and in my view on of the fields "apt_medica" is an upload type field.
>
> It does not show the link to get the file.
>
>
> How to show it?
>
> Thank you
>
>
> António
>
>

-- 





Re: [web2py] Re: sqlform.grid does not delete record

2013-01-23 Thread António Ramos
Strange, i did not add arg as you suggested and today the delete button
works.
Yesterday it was not working.

Thank you for your time
António

2013/1/22 Niphlod 

> SQLFORM.grid uses args to determine what to do. you are using
> request.args(0) in your query without letting know the grid that the
> args(0) is needed by you and should be left alone .
>
> please use SQLFORM.grid( ... args=request.args[:1])
>
> On Tuesday, January 22, 2013 5:25:06 PM UTC+1, Ramos wrote:
>>
>> hello
>> my sqlform.grid delete button , deletes the document from the grid but if
>> i refresh the page the document comes back again to the grid.
>>
>> mytable = SQLFORM.grid( db.t_docs.f_trab_ref==request.**args(0),
>> csv=False,
>> searchable=False,
>> maxtextlength=32,
>> details=False,
>> editable=False,
>> )
>>
>>
>> I have to go to admin to delete the record
>>
>>
>>
>>
>>
>>
>>
>> What is wrong?
>>
>>
>>
>> Thank you
>>
>  --
>
>
>
>

-- 





[web2py] How to put both login and register forms on one page...

2013-01-23 Thread sasogeek
how do I put the login and register forms on one page... so that a user is 
logged in if they click the login button (if they've entered correct email 
and password) and are signed up if they click the register button with form 
data for a new account?

-- 





Re: [web2py] install web2py + Apache + opensuse

2013-01-23 Thread Richard Vézina
On Wed, Jan 23, 2013 at 12:09 PM, Mauricio Gallo Ocampo <
magallo...@gmail.com> wrote:

> nual to install web2py + Apache + Opensuse


This should be easy once you install OpenSuse and Apache, you need to
install web2py  in /home/www-data for example...

Then the difference with Ubuntu will be the default user of apache that
should be :

Should be User: wwwrun ; Group: www

According to this forum :
http://www.linuxquestions.org/questions/suse-novell-60/what-is-the-webservers-apache-default-user-group-on-suse-361528/

You will need also to install a couple of web2py dependency. You should
read the script for that. Packages name may be diffrents under Open Suse.

Look at the deployment script (/web2py/scripts/*) to get the Aapche config
and adapt it to OpenSuse. Restart apache and it should work.

Good luck

Richard

-- 





[web2py] Re: How do I use web2py to make a simple GUI?

2013-01-23 Thread François Delpierre
Hi Kaare,

I'm not sure I fully understand your need. But, if all you need is a simple 
web app to make a calculation from some fields and get one or more answers, 
Web2Py is probably the right tool for doing it. One of your wish is to have 
this app correctly displaying on your mobile phone browser. For this point, 
Web2Py will provide some quite good templates that should do the trick, 
then it's not about Web2Py anymore, it's more about your knowledge of html 
& css. What I would recommend in your situation, is to make a very small 
proof of concept:
- Setup a Web2Py, with ability to connect from your phone.
- From your PC, build a very small app, using the wizard, and just one 
additional table (additional to the default user table), with the fields 
you need to compute, and one or more for the result(s). This should not 
take more than few minutes. 
- Register and test the app from your PC.
- Then test from your mobile, at least of the display & speed.
If you're satisfied with what you see, Web2Py is the best tool to do it.

If now you want some specific look & feel, or even animations in buttons or 
other part of the web page, learning Web2py is just a detail compared to 
the time you will need to learn JavaScript & libraries use to do it.

P.S. If interested with Web2Py, read the book (Printed version ideally). 
For sure you will get a short return on investment.

Regards,

-- 





Re: [web2py] How do I use web2py to make a simple GUI?

2013-01-23 Thread Richard Vézina
This site may help you : http://killer-web-development.com/

If you search in the group mailing list you will find many thread citing a
bunch of ressources.

Richard


On Wed, Jan 23, 2013 at 5:03 PM, Kaare Mikkelsen
wrote:

> Hi, it is possible that the answer to this question turns out to be that
> I'm using the wrong tool altogether, so I'll start by describing what I
> wish to accomplish. If you just want to skip to the question, jump to the
> bottom.
>
> I wish to make a small app that does a somewhat simple calculation which I
> do fairly often. I thought it would be a good exercise to make it as a web
> application, rather than an app for my smartphone's OS. I'm reasonably
> comfortable with programming, and am learning python (though I'm still more
> comfortable with Matlab or c++), so making the backend to the app is
> child's play. What I need to learn is how to make the frontend. How to make
> the form, style it to fit with the use case, add buttons, and tie it all
> together with the backend. Preferably also make it accommodate different
> display sizes. Once all that works, of course, there is a lot of extra
> features that could be fun to tackle.
>
> I've read the "Overview" part of the online book, and skimmed some of the
> other parts. I feel something is missing, at least relative to what I'm
> trying to do? I would think that there should be additional levels between
> "hello world" and "how to make your own wiki"? I get the feeling that this
> tool is intended for far more sophisticated projects than what I'm shooting
> for, and perhaps I should be looking somewhere else? That I was supposed to
> have learned how to do these things before coming here?
>
> QUESTION:
> Is there a place where I can go learn how to make and customize forms? I
> know I'll have to become properly acquainted with html at some point as
> well, and if that is the answer, I hope someone can direct me where to look
> and learn? I was hoping to find a way where python and html were the only
> necessaries?
>
> I hope the above makes sense, and that someone can help me out :)
>
>
>  --
>
>
>
>

-- 





Re: [web2py] update easy_install

2013-01-23 Thread Richard Vézina
Did you try pip?

Richard


On Wed, Jan 23, 2013 at 4:56 PM, Derek  wrote:

> I know how to get the latest version. I was just mentioning that when I
> run easy_install, it tries to install an older version. Perhaps Massimo can
> submit the new version to pip.
>
>
> On Wednesday, January 23, 2013 2:22:30 PM UTC-7, Richard wrote:
>
>> wget 
>> http://web2py.com/examples/**static/web2py_src.zip
>>
>> Latest stable.
>>
>> Then you unzip it where you want.
>>
>>
>>
>>
>> On Wed, Jan 23, 2013 at 3:53 PM, Derek  wrote:
>>
>>> running: easy_install web2py - it installs version 2.1.1 - can you make
>>> this install the latest stable version?
>>>
>>> --
>>>
>>>
>>>
>>>
>>
>>  --
>
>
>
>

-- 





[web2py] SQLFORM.smartgrid: TSV & CSV export with hidden cols only shows visible cols

2013-01-23 Thread François Delpierre
When using the CSV export with hidden cols or the TSV export with hidden 
cols, I have none of the hidden columns in the view.
Here is the SQLFORM being used:

def index():
form = SQLFORM.smartgrid(
  db.t_bsc,
  onupdate=auth.archive,
  linked_tables=['t_bsc', 't_device', 't_device2ip', 't_ip', 
't_ip2port', 't_port' ,],
  fields=[
db.t_bsc.f_name,
db.t_bsc.f_service_type,
db.t_bsc.f_service_category,
db.t_bsc.f_business_units,
db.t_bsc.f_service_owner,
db.t_bsc.f_business_priority,
db.t_device.f_hostname,
db.t_device.f_role,
db.t_device.f_pci_scope,
  ],
  maxtextlength=40,
  links={'t_bsc':[{'header':'Service Notifications', 
'body':service_notif}]},
)
plugin=plugin_multiselect(db.t_bsc.f_supporting_svc)
return locals()

And when I make an export, even with hidden columns, I have only the 
following fields:

t_bsc.f_namet_bsc.f_service_typet_bsc.f_service_categoryt_bsc.f_business_unitst_bsc.f_service_ownert_bsc.f_business_priorityt_bsc.id

while there are many other fields.

Tested with version: Current (2.3.2 stable)

This looks like a bug.

Thanks,

-- 





[web2py] How do I use web2py to make a simple GUI?

2013-01-23 Thread Kaare Mikkelsen
Hi, it is possible that the answer to this question turns out to be that 
I'm using the wrong tool altogether, so I'll start by describing what I 
wish to accomplish. If you just want to skip to the question, jump to the 
bottom.

I wish to make a small app that does a somewhat simple calculation which I 
do fairly often. I thought it would be a good exercise to make it as a web 
application, rather than an app for my smartphone's OS. I'm reasonably 
comfortable with programming, and am learning python (though I'm still more 
comfortable with Matlab or c++), so making the backend to the app is 
child's play. What I need to learn is how to make the frontend. How to make 
the form, style it to fit with the use case, add buttons, and tie it all 
together with the backend. Preferably also make it accommodate different 
display sizes. Once all that works, of course, there is a lot of extra 
features that could be fun to tackle.

I've read the "Overview" part of the online book, and skimmed some of the 
other parts. I feel something is missing, at least relative to what I'm 
trying to do? I would think that there should be additional levels between 
"hello world" and "how to make your own wiki"? I get the feeling that this 
tool is intended for far more sophisticated projects than what I'm shooting 
for, and perhaps I should be looking somewhere else? That I was supposed to 
have learned how to do these things before coming here?

QUESTION:
Is there a place where I can go learn how to make and customize forms? I 
know I'll have to become properly acquainted with html at some point as 
well, and if that is the answer, I hope someone can direct me where to look 
and learn? I was hoping to find a way where python and html were the only 
necessaries?

I hope the above makes sense, and that someone can help me out :) 


-- 





Re: [web2py] update easy_install

2013-01-23 Thread Derek
I know how to get the latest version. I was just mentioning that when I run 
easy_install, it tries to install an older version. Perhaps Massimo can 
submit the new version to pip.

On Wednesday, January 23, 2013 2:22:30 PM UTC-7, Richard wrote:
>
> wget http://web2py.com/examples/static/web2py_src.zip
>
> Latest stable.
>
> Then you unzip it where you want.
>
>
>
>
> On Wed, Jan 23, 2013 at 3:53 PM, Derek >wrote:
>
>> running: easy_install web2py - it installs version 2.1.1 - can you make 
>> this install the latest stable version? 
>>
>> -- 
>>  
>>  
>>  
>>
>
>

-- 





[web2py] install web2py + Apache + opensuse

2013-01-23 Thread Mauricio Gallo Ocampo
Anyone know of manual to install web2py + Apache + Opensuse

-- 





[web2py] Edit button behavior with sqlform.grid and multiple joins

2013-01-23 Thread Jason Martens
Hello All,
   I have a SQLFORM.grid with multiple joins that looks something like this:

query = (db.locations.id == 10) & (db.rooms.id == db.locations.room_id) & 
(db.other.id == db.rooms.other_id)
SQLFORM.grid(query)

The problem is the edit button defaults to the other table, and I want it 
to go to the rooms table to edit the room details.  How can I fix this?

Thanks,
Jason


-- 





[web2py] How do I use web2py to make a simple GUI?

2013-01-23 Thread Kaare Mikkelsen
Hi, the answer to this question may well be that I should leave web2py 
alone and use something else, so I had better start explaining what I'm 
trying to do. I'm sorry if my post comes across as long-winded, feel free 
to skip to the question at the bottom:

I want to make a small app for a special, quite simple, calculation that I 
do fairly often. I thought it would be a good exercise to learn how to make 
this as a web-application (rather than digging into how to make apps for my 
smartphone OS) that I could use through the browser on my phone. I'm 
reasonably comfortable with programming, and getting better at python 
(though I must say I'm still more comfortable with Matlab and c++). So, 
really, first I just need to make input fields, a "go"-button, and 
preferably learn how to accommodate different display sizes. Later, 
naturally, there is a range of features that could be fun to tackle.

But, when reading the online book, it seems the focus is on very different 
things, with much more advanced functionality than what I need. Somehow I 
feel there should be a bit more detail between "hello world" and making my 
own wiki. I have read the "Overview" thoroughly, and bits and pieces of the 
rest.

I found web2py from googling how to use python to build a web application, 
which lead me to django, which lead to comparisons of web2py and django, 
leading me to think that this was the more beginner-friendly tool.

QUESTION:
Is there a place where I can learn about making input forms (animating the 
buttons, defining what happens when they're clicked etc.), either from 
scratch or a general class? I have no experience with html, but of course I 
am expecting to have to get familiar with that as well. Are these simple 
objects things one should be comfortable with before tackling advanced 
tools such as web2py? (if so, how?)

I hope the above wasn't too long, and that someone can point me in the 
right direction :)

-- 





Re: [web2py] update easy_install

2013-01-23 Thread Richard Vézina
wget http://web2py.com/examples/static/web2py_src.zip

Latest stable.

Then you unzip it where you want.




On Wed, Jan 23, 2013 at 3:53 PM, Derek  wrote:

> running: easy_install web2py - it installs version 2.1.1 - can you make
> this install the latest stable version?
>
> --
>
>
>
>

-- 





[web2py] update easy_install

2013-01-23 Thread Derek
running: easy_install web2py - it installs version 2.1.1 - can you make 
this install the latest stable version?

-- 





Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-23 Thread paolo.vall...@gmail.com
yep, I've added it under the location / and it worked. You are right it
might be placed in the main configuration, on the other hand today at work
I was blocked because unable to upload files greaten than 1M. From my point
of view we should at least mention it. For what concerns gzip is that on
ubuntu server I can see that is already enabled by default.
paolo


2013/1/23 niphlod 

> uhm. this is outside the scope of the location  I mean... probably
> you'd like to turn on gzip too, but that is a feature to enable on nginx
> "main" conf, not in the "web2py" one 
> Anyway, did you put this setting inside the file
> /etc/nginx/sites-available/web2py and it just works ok ?
>
>
> 2013/1/23 paolo.vall...@gmail.com 
>
>> In the meanwhile I discovered that if you upload a file greater than 1M,
>> I tried with a 1.5M, you will get a 413 error. In order to avoid this error
>> for file not so big, I suggest you to add the directive *client_max_body_size
>> *and to set it at something more 'common' for me few MB is already ok.
>> see here: http://wiki.nginx.org/HttpCoreModule#client_max_body_size
>> paolo
>>
>>
>>
>> 2013/1/23 Niphlod 
>>
>>> ok, I'll test it more @home and then add a commented section to the
>>> script
>>>
>>> PS: that site you posted . turn off response.optimize_js = 'inline'
>>> pleeease :P
>>>
>>>
>>> On Wednesday, January 23, 2013 11:19:34 AM UTC+1, Paolo valleri wrote:
>>>
 Just tested, it works, I've already upgraded the production server too
 :-P
 I would suggest to add it (maybe as a comment) to the script.
 Thanks, Paolo


 2013/1/22 Niphlod 

 maybe I have a fix .
> Can you please test it ?
> assuming an example of routes.py like
>
> myapp = dict(languages=['en', 'it', 'jp'], default_language='en')
>
>
> this means that navigating to:
>  /myapp/ --> the static files will be referenced as
> web2py_home/applications/**myapp/en/static/whatever.css
>  /myapp/it/ --> the static files will be referenced as
> web2py_home/applications/**myapp/it/static/whatever.css
>
> however, direct requests to /myapp/static/whatever.css should map to
> web2py_home/applications/**myapp/en/static/whatever.css
>
> additionally, if /myapp/it/static/whatever.css is requested, if not
> found web2py_home/applications/**myapp/static/whatever.css should be
> served.
>
> Now, I think that adding this section before the standard one will fix
> the issue
>
> location ~* /(\w+)/(en|it|jp)/static/(.*)$ {
> alias /home/www-data/web2py/applicat**ions/$1/;
> try_files static/$2/$3 static/$3 =404;
> }
>
> (en|it|jp) here is the regex matching the "languages" list of the
> routes app's dict  This will set for the request
> /myapp/it/static/whatever.css   the alias to the web2py_home/applications/
> **myapp/ and then try to serve static/it/whatever.css, if not found,
> it will fall back to a "normal" static/whatever.css, and if that one is 
> not
> found will return a 404.
>
> @Jonathan: please stop me if I did miss something in the routes logic
> @all : seems a simple fix - maybe too simple... please help test it
>
>
> On Tuesday, January 22, 2013 9:14:26 PM UTC+1, Niphlod wrote:
>>
>> got it. can you post the routes.py you're using ?
>>
>> The problem lies in the fact that routes.py is really flexible and
>> adapting that logic using only rewrite or alias statements in nginx is
>> cumbersome.
>> Standing on one feet (i.e. without tests) I'd say that the regex
>> checking static files
>>
>> location ~* /(\w+)/static/ {
>> root /home/www-data/web2py/**applicat**ions/;
>> #remove next comment on production
>>
>>
>>
>>
>>
>> #expires max;
>> }
>>
>> is catching it as the app name and not the language "trick" . so, for a 
>> request going to /it/app/static/whatever.css is looking into
>>
>>
>>
>>
>>
>>
>> /home/www-data/web2py/**applicat**ions/*it/*appname/**static/**whatever.css
>>  instead of  . (remove the bold part, "*it/*").
>>
>> If you remove those lines web2py will take charge for static files
>> serving, so the issue will be temporarily fixed.
>>
>> I'll try to set up some additional rules to make nginx behave like
>> routes.py, but it will take some time.
>>
>> PS: please mind that the script it's a template it's not meant to
>> fullfill every custom installation patterns out there without further
>> tuning.
>> language routing is probably the most difficult out there because for
>> a request
>> /it/appname/static/**whateverfil**e.css
>> web2py looks into /web2py/appname/static/it/**what**everfile.css and
>> then if not found into /web2py/appname/sta

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-23 Thread niphlod
uhm. this is outside the scope of the location  I mean... probably
you'd like to turn on gzip too, but that is a feature to enable on nginx
"main" conf, not in the "web2py" one 
Anyway, did you put this setting inside the file
/etc/nginx/sites-available/web2py and it just works ok ?


2013/1/23 paolo.vall...@gmail.com 

> In the meanwhile I discovered that if you upload a file greater than 1M, I
> tried with a 1.5M, you will get a 413 error. In order to avoid this error
> for file not so big, I suggest you to add the directive *client_max_body_size
> *and to set it at something more 'common' for me few MB is already ok.
> see here: http://wiki.nginx.org/HttpCoreModule#client_max_body_size
> paolo
>
>
>
> 2013/1/23 Niphlod 
>
>> ok, I'll test it more @home and then add a commented section to the script
>>
>> PS: that site you posted . turn off response.optimize_js = 'inline'
>> pleeease :P
>>
>>
>> On Wednesday, January 23, 2013 11:19:34 AM UTC+1, Paolo valleri wrote:
>>
>>> Just tested, it works, I've already upgraded the production server too
>>> :-P
>>> I would suggest to add it (maybe as a comment) to the script.
>>> Thanks, Paolo
>>>
>>>
>>> 2013/1/22 Niphlod 
>>>
>>> maybe I have a fix .
 Can you please test it ?
 assuming an example of routes.py like

 myapp = dict(languages=['en', 'it', 'jp'], default_language='en')


 this means that navigating to:
  /myapp/ --> the static files will be referenced as
 web2py_home/applications/**myapp/en/static/whatever.css
  /myapp/it/ --> the static files will be referenced as
 web2py_home/applications/**myapp/it/static/whatever.css

 however, direct requests to /myapp/static/whatever.css should map to
 web2py_home/applications/**myapp/en/static/whatever.css

 additionally, if /myapp/it/static/whatever.css is requested, if not
 found web2py_home/applications/**myapp/static/whatever.css should be
 served.

 Now, I think that adding this section before the standard one will fix
 the issue

 location ~* /(\w+)/(en|it|jp)/static/(.*)$ {
 alias /home/www-data/web2py/applicat**ions/$1/;
 try_files static/$2/$3 static/$3 =404;
 }

 (en|it|jp) here is the regex matching the "languages" list of the
 routes app's dict  This will set for the request
 /myapp/it/static/whatever.css   the alias to the web2py_home/applications/
 **myapp/ and then try to serve static/it/whatever.css, if not found,
 it will fall back to a "normal" static/whatever.css, and if that one is not
 found will return a 404.

 @Jonathan: please stop me if I did miss something in the routes logic
 @all : seems a simple fix - maybe too simple... please help test it


 On Tuesday, January 22, 2013 9:14:26 PM UTC+1, Niphlod wrote:
>
> got it. can you post the routes.py you're using ?
>
> The problem lies in the fact that routes.py is really flexible and
> adapting that logic using only rewrite or alias statements in nginx is
> cumbersome.
> Standing on one feet (i.e. without tests) I'd say that the regex
> checking static files
>
> location ~* /(\w+)/static/ {
> root /home/www-data/web2py/**applicat**ions/;
> #remove next comment on production
>
>
>
> #expires max;
> }
>
> is catching it as the app name and not the language "trick" . so, for a 
> request going to /it/app/static/whatever.css is looking into
>
>
>
>
> /home/www-data/web2py/**applicat**ions/*it/*appname/**static/**whatever.css
>  instead of  . (remove the bold part, "*it/*").
>
> If you remove those lines web2py will take charge for static files
> serving, so the issue will be temporarily fixed.
>
> I'll try to set up some additional rules to make nginx behave like
> routes.py, but it will take some time.
>
> PS: please mind that the script it's a template it's not meant to
> fullfill every custom installation patterns out there without further
> tuning.
> language routing is probably the most difficult out there because for
> a request
> /it/appname/static/**whateverfil**e.css
> web2py looks into /web2py/appname/static/it/**what**everfile.css and
> then if not found into /web2py/appname/static/**whateve**rfile.css (a
> nice fallback, but hard to map with a simple nginx statement)
>
> On Tuesday, January 22, 2013 6:14:55 PM UTC+1, Paolo valleri wrote:
>>
>> Hi Massimo, for example, if I visit this
>> traffic.integreen-life.bz.it/**d**efault/wiki/about
>>  (default is the controller and wiki is the function) it works while
>> traffic.integreen-life.bz.it/**i**t/default/wiki/aboutthe

[web2py] Re: Re-enable admin interface

2013-01-23 Thread Niphlod
yep. w2p files are just a tar.gz of the applications/theapp folder .

On Wednesday, January 23, 2013 4:39:49 PM UTC+1, Wonton wrote:
>
> About upload a packed project to the server without admin access I guess 
> is ok just uploading via FTP the project (application) directory to web2py 
> applications subdirectory, am I wright?
>
> On Tuesday, January 22, 2013 5:56:13 PM UTC+1, Wonton wrote:
>>
>> Thanks, I will try this.
>>
>> Anyway, is there any way to upload a packed project to the server without 
>> admin access?
>>
>> El lunes, 21 de enero de 2013 22:28:41 UTC+1, Niphlod escribió:
>>>
>>> admin works on sessions like any other app. I think your problem will be 
>>> easily fixed by just deleting the applications/admin/sessions/* files.
>>>
>>> On Monday, January 21, 2013 7:18:01 PM UTC+1, Wonton wrote:

 Hello,

 Trying to upload my web2py project to the server I failed to enter the 
 admin password (4 times :-S) so the admin interface was automatically 
 disabled. 
 Since I have no access to my server and I have to request all things to 
 the server administrators I asked them to re-enable the admin interface. 
 But they have answer me that they don't know how to do it, so...what 
 should 
 they do to re-enable the admin interface? The server is a "typical" Apache.

 Kind regards and thank you very much!

>>>

-- 





Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-23 Thread paolo.vall...@gmail.com
In the meanwhile I discovered that if you upload a file greater than 1M, I
tried with a 1.5M, you will get a 413 error. In order to avoid this error
for file not so big, I suggest you to add the directive *client_max_body_size
*and to set it at something more 'common' for me few MB is already ok. see
here: http://wiki.nginx.org/HttpCoreModule#client_max_body_size
paolo


2013/1/23 Niphlod 

> ok, I'll test it more @home and then add a commented section to the script
>
> PS: that site you posted . turn off response.optimize_js = 'inline'
> pleeease :P
>
>
> On Wednesday, January 23, 2013 11:19:34 AM UTC+1, Paolo valleri wrote:
>
>> Just tested, it works, I've already upgraded the production server too :-P
>> I would suggest to add it (maybe as a comment) to the script.
>> Thanks, Paolo
>>
>>
>> 2013/1/22 Niphlod 
>>
>> maybe I have a fix .
>>> Can you please test it ?
>>> assuming an example of routes.py like
>>>
>>> myapp = dict(languages=['en', 'it', 'jp'], default_language='en')
>>>
>>>
>>> this means that navigating to:
>>>  /myapp/ --> the static files will be referenced as
>>> web2py_home/applications/**myapp/en/static/whatever.css
>>>  /myapp/it/ --> the static files will be referenced as
>>> web2py_home/applications/**myapp/it/static/whatever.css
>>>
>>> however, direct requests to /myapp/static/whatever.css should map to
>>> web2py_home/applications/**myapp/en/static/whatever.css
>>>
>>> additionally, if /myapp/it/static/whatever.css is requested, if not
>>> found web2py_home/applications/**myapp/static/whatever.css should be
>>> served.
>>>
>>> Now, I think that adding this section before the standard one will fix
>>> the issue
>>>
>>> location ~* /(\w+)/(en|it|jp)/static/(.*)$ {
>>> alias /home/www-data/web2py/applicat**ions/$1/;
>>> try_files static/$2/$3 static/$3 =404;
>>> }
>>>
>>> (en|it|jp) here is the regex matching the "languages" list of the routes
>>> app's dict  This will set for the request /myapp/it/static/whatever.css
>>>   the alias to the web2py_home/applications/**myapp/ and then try to
>>> serve static/it/whatever.css, if not found, it will fall back to a "normal"
>>> static/whatever.css, and if that one is not found will return a 404.
>>>
>>> @Jonathan: please stop me if I did miss something in the routes logic
>>> @all : seems a simple fix - maybe too simple... please help test it
>>>
>>>
>>> On Tuesday, January 22, 2013 9:14:26 PM UTC+1, Niphlod wrote:

 got it. can you post the routes.py you're using ?

 The problem lies in the fact that routes.py is really flexible and
 adapting that logic using only rewrite or alias statements in nginx is
 cumbersome.
 Standing on one feet (i.e. without tests) I'd say that the regex
 checking static files

 location ~* /(\w+)/static/ {
 root /home/www-data/web2py/**applicat**ions/;
 #remove next comment on production


 #expires max;
 }

 is catching it as the app name and not the language "trick" . so, for a 
 request going to /it/app/static/whatever.css is looking into



 /home/www-data/web2py/**applicat**ions/*it/*appname/**static/**whatever.css
  instead of  . (remove the bold part, "*it/*").

 If you remove those lines web2py will take charge for static files
 serving, so the issue will be temporarily fixed.

 I'll try to set up some additional rules to make nginx behave like
 routes.py, but it will take some time.

 PS: please mind that the script it's a template it's not meant to
 fullfill every custom installation patterns out there without further
 tuning.
 language routing is probably the most difficult out there because for a
 request
 /it/appname/static/**whateverfil**e.css
 web2py looks into /web2py/appname/static/it/**what**everfile.css and
 then if not found into /web2py/appname/static/**whateve**rfile.css (a
 nice fallback, but hard to map with a simple nginx statement)

 On Tuesday, January 22, 2013 6:14:55 PM UTC+1, Paolo valleri wrote:
>
> Hi Massimo, for example, if I visit this traffic.integreen-life.bz.it/
> **d**efault/wiki/about
>  (default is the controller and wiki is the function) it works while
> traffic.integreen-life.bz.it/**i**t/default/wiki/aboutthe
>  application works very well but the static links do not.
>
> Paolo
>
>
> 2013/1/22 Massimo Di Pierro 
>
>> can you show an example?
>>
>>
>> On Tuesday, 22 January 2013 07:36:39 UTC-6, Paolo valleri wrote:
>>
>>> Hi all, I've just discovered that the regex used to retrieve the
>>> static files doesn't work if I use languages abbreviation in urls.
>>> How can we fix this?
>>>
>>>
>>>
>>> 20

Re: [web2py] Re: anyserver.py not working properly for gevent

2013-01-23 Thread Jim Kellas
Yes, that looks good and my test passed successfully.

Jim

From:  Massimo Di Pierro 
Reply-To:  
Date:  Wednesday, January 23, 2013 6:48 AM
To:  
Subject:  [web2py] Re: anyserver.py not working properly for gevent

Thank you for bringing this up. It is a serious issue. I think I have fixed
this in trunk in anyserver. Can you check my solution is acceptable?

On Wednesday, 23 January 2013 01:09:48 UTC-6, JimK  wrote:
> Since gluon.main and gluon.fileutils are being imported before gevent's
> monkey.patch_all() is run, the sessions were getting mixed up.
> 
> Here's the code I used that verified the issue (found on this forum):
> 
> def index():
> import time
> from gluon import current
> print current.request.uuid
> time.sleep(10)
> print current.request.uuid
> return dict(done='done!')
> 
> Load this method in 2 different browsers within 10 seconds and you'll see that
> the uuids are out of sync.
> 
> It should be:
> A
> B
> A
> B
> 
> But instead you get:
> A
> B
> B
> B
> 
> To fix this, I created a separate file that just starts the gevent server.
> Essentially, before importing the gluon modules, I run:
> from gevent import monkey
> monkey.patch_all()
> 
> After running the test again, I get:
> A
> B
> A
> B
> 
> So, should we remove gevent from anyserver.py and add gevent_server.py?  This
> would save others from encountering the same issue that I did.
-- 
 
 
 


-- 





[web2py] Re: Grid with multiple left joins

2013-01-23 Thread Mark
I also hope this can be done. In sqlhtml.py, simply change following code:

if left is not None:
tablenames += db._adapter.tables(left)

into:

if left is not None:
if isinstance(left, (list)):
for l in left:
tablenames += db._adapter.tables(l)
else:
tablenames += db._adapter.tables(left)



On Friday, January 18, 2013 11:17:19 AM UTC-5, Massimo Di Pierro wrote:
>
> Looks good.
> Can you please send me a patch applied to the trunk version? 
>
> On Friday, 18 January 2013 05:47:20 UTC-6, Felipe Meirelles wrote:
>>
>> Did anyone saw it?
>>
>> On Monday, January 14, 2013 5:41:36 PM UTC-2, Felipe Meirelles wrote:
>>>
>>> Please desconsider the sorter_icons parameter, its a custom 
>>> implementation of mine.
>>> I can post this patch too if you think its relevant.
>>>
>>> Thanks!
>>>
>>> On Monday, January 14, 2013 5:38:53 PM UTC-2, Felipe Meirelles wrote:

 Hi,

 When you try to make more than one left join on a SQLFORM.grid as:

 grid = SQLFORMCustom.grid(db.device,
 fields=[db.device.serial, db.device.device_type, 
 db.device.vehicle, db.vehicle.plate, db.chip.imei, ],
 field_id=db.device.id,
 left=[db.chip.on(db.chip.id==db.device.chip), db.vehicle.on(
 db.vehicle.id==db.device.vehicle)],
 paginate=max_results,
 showbuttontext=False,
 formstyle='divs',
 paginate_icons=paginate_icons,
 sorter_icons=sorter_icons
 )

 it can't display the join fields as it dosen't find the fields on the 
 query in sqlhtml.py line 1083.

 Can you apply this patch on line 1083?

 if left is not None:
 if isinstance(left, (list)):
 for l in left:
 tablenames += db._adapter.tables(l)
 else:
 tablenames += db._adapter.tables(left)

>>>

-- 





[web2py] Re: bug in smartgrid groupby

2013-01-23 Thread Mark
It is great to know. Thanks!

On Tuesday, January 22, 2013 5:03:08 PM UTC-5, Massimo Di Pierro wrote:
>
> This this been fixed in trunk some time ago.
>
> On Friday, 18 January 2013 11:21:20 UTC-6, Mark wrote:
>>
>> For web2py 2.2.1.
>>
>> When I use groupby in smartgrid, the number of records found usually 
>> displays a wrong number.  Often displays "1 records found" even there are 
>> many records in the grid. Sometime, for examples, displays 11 when there 
>> are 9 records in grid, displays 2 when there are 4 records. The number will 
>> be displayed correctly if I remove the groupby from grid.  
>>
>> Thanks,
>> Mark
>>
>

-- 





[web2py] Re: Re-enable admin interface

2013-01-23 Thread Wonton
About upload a packed project to the server without admin access I guess is 
ok just uploading via FTP the project (application) directory to web2py 
applications subdirectory, am I wright?

On Tuesday, January 22, 2013 5:56:13 PM UTC+1, Wonton wrote:
>
> Thanks, I will try this.
>
> Anyway, is there any way to upload a packed project to the server without 
> admin access?
>
> El lunes, 21 de enero de 2013 22:28:41 UTC+1, Niphlod escribió:
>>
>> admin works on sessions like any other app. I think your problem will be 
>> easily fixed by just deleting the applications/admin/sessions/* files.
>>
>> On Monday, January 21, 2013 7:18:01 PM UTC+1, Wonton wrote:
>>>
>>> Hello,
>>>
>>> Trying to upload my web2py project to the server I failed to enter the 
>>> admin password (4 times :-S) so the admin interface was automatically 
>>> disabled. 
>>> Since I have no access to my server and I have to request all things to 
>>> the server administrators I asked them to re-enable the admin interface. 
>>> But they have answer me that they don't know how to do it, so...what should 
>>> they do to re-enable the admin interface? The server is a "typical" Apache.
>>>
>>> Kind regards and thank you very much!
>>>
>>

-- 





Re: [web2py] Re: SQLFORM.grid with multiple LEFT OUTER JOINs

2013-01-23 Thread Jim Steil
2.4.1-alpha.2+timestamp.2013.01.23.08:17:15

Just updated this morning.

-Jim

On Wed, Jan 23, 2013 at 8:55 AM, Massimo Di Pierro <
massimo.dipie...@gmail.com> wrote:

> Which version? I thought we fixed this in trunk.
>
>
> On Wednesday, 23 January 2013 08:54:38 UTC-6, Jim S wrote:
>>
>> Oh, and the problem is that the grid only displays the data from the
>> primary table.  The join 'works', but there is no data for the joined
>> tables in the grid.
>>
>> -Jim
>>
>> On Wednesday, January 23, 2013 8:53:55 AM UTC-6, Jim S wrote:
>>>
>>> Just updated to the latest version and am still having this problem.  To
>>> be specific, I can do this:
>>>
>>> query = (db.feedLoad.deliverOn==datetime.datetime.today())&(db.feedLoad.
>>> siteId==1)
>>>
>>> left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId
>>> ),
>>>  db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.
>>> feedOrderId)]
>>>
>>> rows = db(query).select(db.feedLoad.ALL, db.feedOrder.ALL, db.
>>> feedOrderLine.ALL,left=left)
>>> for row in rows:
>>>  print row
>>>
>>>
>>>
>>>
>>> But I can't do this:
>>>
>>> query = (db.feedLoad.deliverOn==datetime.datetime.today())&(db.feedLoad.
>>> siteId==1)
>>>
>>> fields = [db.feedLoad.siteId, db.feedOrderLine.productSiteId, db.
>>> feedLoad.deliverOn, db.feedLoad.loadNumber,
>>> db.feedOrder.customerName, db.feedOrder.customerCityState,
>>> db.feedOrder.dropShipName, db.feedOrder.dropShipCityState,
>>> db.feedLoad.driverId, db.feedOrder.orderNumber,
>>> db.feedOrderLine.productNumber, db.feedOrderLine.productName]
>>>
>>> left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId
>>> ),db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.
>>> feedOrderId)]
>>>
>>> grid = SQLFORM.grid(query, fields=fields, left=left,
>>> create=False, deletable=False,
>>> details=False, csv=False,
>>> editable=False, searchable=False,
>>> paginate=200)
>>>
>>>
>>>
>>>
>>>
>>> It would be great to get this working or let me know what I'm doing
>>> wrong with my grid.
>>>
>>> Thanks - Jim
>>>
>>> On Friday, January 18, 2013 8:25:01 AM UTC-6, Jim S wrote:

 I just saw this post as well:
 https://groups.google.com/forum/#!topic/web2py/T1TkWEu2cX4

 Can we get his fix implemented?

 -Jim

 On Friday, January 18, 2013 8:21:35 AM UTC-6, Jim S wrote:
>
> I tried that, but then I don't get any of my joined fields in the
> result.  Here is what I used for the join.
>
> left =
> [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),
>
> db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.feedOrderId)]
>
> I get no fields from either feedOrder or the feedOrderLine tables,
> only fields from feedLoad.
>
> -Jim
>
> On Friday, January 18, 2013 5:39:03 AM UTC-6, DenesL wrote:
>>
>> Hi Jim,
>>
>> from the book:
>> "Multiple left joins can be combined by passing a list or tuple of
>> db.mytable.on(...) to the left attribute."
>>
>> Denes
>>
> --
>
>
>
>

-- 





[web2py] Re: SQLFORM.grid with multiple LEFT OUTER JOINs

2013-01-23 Thread Massimo Di Pierro
Which version? I thought we fixed this in trunk.

On Wednesday, 23 January 2013 08:54:38 UTC-6, Jim S wrote:
>
> Oh, and the problem is that the grid only displays the data from the 
> primary table.  The join 'works', but there is no data for the joined 
> tables in the grid.
>
> -Jim
>
> On Wednesday, January 23, 2013 8:53:55 AM UTC-6, Jim S wrote:
>>
>> Just updated to the latest version and am still having this problem.  To 
>> be specific, I can do this:
>>
>> query = (db.feedLoad.deliverOn==datetime.datetime.today())&(db.feedLoad.
>> siteId==1)
>>  
>> left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),
>>  db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.
>> feedOrderId)]
>>
>> rows = db(query).select(db.feedLoad.ALL, db.feedOrder.ALL, db.
>> feedOrderLine.ALL,left=left)
>> for row in rows:
>>  print row
>>
>>
>>
>>
>> But I can't do this:
>>
>> query = (db.feedLoad.deliverOn==datetime.datetime.today())&(db.feedLoad.
>> siteId==1)
>>  
>> fields = [db.feedLoad.siteId, db.feedOrderLine.productSiteId, db.feedLoad
>> .deliverOn, db.feedLoad.loadNumber, 
>> db.feedOrder.customerName, db.feedOrder.customerCityState,
>> db.feedOrder.dropShipName, db.feedOrder.dropShipCityState,
>> db.feedLoad.driverId, db.feedOrder.orderNumber,
>> db.feedOrderLine.productNumber, db.feedOrderLine.productName]
>>  
>> left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),
>> db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.
>> feedOrderId)]
>>
>> grid = SQLFORM.grid(query, fields=fields, left=left,
>> create=False, deletable=False,
>> details=False, csv=False, 
>> editable=False, searchable=False,
>> paginate=200)
>>
>>
>>
>>
>>
>> It would be great to get this working or let me know what I'm doing wrong 
>> with my grid.
>>
>> Thanks - Jim
>>
>> On Friday, January 18, 2013 8:25:01 AM UTC-6, Jim S wrote:
>>>
>>> I just saw this post as well:   
>>> https://groups.google.com/forum/#!topic/web2py/T1TkWEu2cX4
>>>
>>> Can we get his fix implemented?
>>>
>>> -Jim
>>>
>>> On Friday, January 18, 2013 8:21:35 AM UTC-6, Jim S wrote:

 I tried that, but then I don't get any of my joined fields in the 
 result.  Here is what I used for the join.

 left = 
 [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),

 db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.feedOrderId)]

 I get no fields from either feedOrder or the feedOrderLine tables, only 
 fields from feedLoad.

 -Jim

 On Friday, January 18, 2013 5:39:03 AM UTC-6, DenesL wrote:
>
> Hi Jim,
>
> from the book:
> "Multiple left joins can be combined by passing a list or tuple of 
> db.mytable.on(...) to the left attribute."
>
> Denes
>


-- 





[web2py] Re: SQLFORM.grid with multiple LEFT OUTER JOINs

2013-01-23 Thread Jim S
Oh, and the problem is that the grid only displays the data from the 
primary table.  The join 'works', but there is no data for the joined 
tables in the grid.

-Jim

On Wednesday, January 23, 2013 8:53:55 AM UTC-6, Jim S wrote:
>
> Just updated to the latest version and am still having this problem.  To 
> be specific, I can do this:
>
> query = (db.feedLoad.deliverOn==datetime.datetime.today())&(db.feedLoad.
> siteId==1)
>  
> left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),
>  db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.
> feedOrderId)]
>
> rows = db(query).select(db.feedLoad.ALL, db.feedOrder.ALL, db.
> feedOrderLine.ALL,left=left)
> for row in rows:
>  print row
>
>
>
>
> But I can't do this:
>
> query = (db.feedLoad.deliverOn==datetime.datetime.today())&(db.feedLoad.
> siteId==1)
>  
> fields = [db.feedLoad.siteId, db.feedOrderLine.productSiteId, db.feedLoad.
> deliverOn, db.feedLoad.loadNumber, 
> db.feedOrder.customerName, db.feedOrder.customerCityState,
> db.feedOrder.dropShipName, db.feedOrder.dropShipCityState,
> db.feedLoad.driverId, db.feedOrder.orderNumber,
> db.feedOrderLine.productNumber, db.feedOrderLine.productName]
>  
> left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),
> db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.feedOrderId
> )]
>
> grid = SQLFORM.grid(query, fields=fields, left=left,
> create=False, deletable=False,
> details=False, csv=False, 
> editable=False, searchable=False,
> paginate=200)
>
>
>
>
>
> It would be great to get this working or let me know what I'm doing wrong 
> with my grid.
>
> Thanks - Jim
>
> On Friday, January 18, 2013 8:25:01 AM UTC-6, Jim S wrote:
>>
>> I just saw this post as well:   
>> https://groups.google.com/forum/#!topic/web2py/T1TkWEu2cX4
>>
>> Can we get his fix implemented?
>>
>> -Jim
>>
>> On Friday, January 18, 2013 8:21:35 AM UTC-6, Jim S wrote:
>>>
>>> I tried that, but then I don't get any of my joined fields in the 
>>> result.  Here is what I used for the join.
>>>
>>> left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),
>>>
>>> db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.feedOrderId)]
>>>
>>> I get no fields from either feedOrder or the feedOrderLine tables, only 
>>> fields from feedLoad.
>>>
>>> -Jim
>>>
>>> On Friday, January 18, 2013 5:39:03 AM UTC-6, DenesL wrote:

 Hi Jim,

 from the book:
 "Multiple left joins can be combined by passing a list or tuple of 
 db.mytable.on(...) to the left attribute."

 Denes

>>>

-- 





[web2py] Re: SQLFORM.grid with multiple LEFT OUTER JOINs

2013-01-23 Thread Jim S
Just updated to the latest version and am still having this problem.  To be 
specific, I can do this:

query = (db.feedLoad.deliverOn==datetime.datetime.today())&(db.feedLoad.
siteId==1)
 
left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),
 db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.feedOrderId
)]

rows = db(query).select(db.feedLoad.ALL, db.feedOrder.ALL, db.feedOrderLine.
ALL,left=left)
for row in rows:
 print row




But I can't do this:

query = (db.feedLoad.deliverOn==datetime.datetime.today())&(db.feedLoad.
siteId==1)
 
fields = [db.feedLoad.siteId, db.feedOrderLine.productSiteId, db.feedLoad.
deliverOn, db.feedLoad.loadNumber, 
db.feedOrder.customerName, db.feedOrder.customerCityState,
db.feedOrder.dropShipName, db.feedOrder.dropShipCityState,
db.feedLoad.driverId, db.feedOrder.orderNumber,
db.feedOrderLine.productNumber, db.feedOrderLine.productName]
 
left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),db.
feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.feedOrderId)]

grid = SQLFORM.grid(query, fields=fields, left=left,
create=False, deletable=False,
details=False, csv=False, 
editable=False, searchable=False,
paginate=200)





It would be great to get this working or let me know what I'm doing wrong 
with my grid.

Thanks - Jim

On Friday, January 18, 2013 8:25:01 AM UTC-6, Jim S wrote:
>
> I just saw this post as well:   
> https://groups.google.com/forum/#!topic/web2py/T1TkWEu2cX4
>
> Can we get his fix implemented?
>
> -Jim
>
> On Friday, January 18, 2013 8:21:35 AM UTC-6, Jim S wrote:
>>
>> I tried that, but then I don't get any of my joined fields in the result. 
>>  Here is what I used for the join.
>>
>> left = [db.feedOrder.on(db.feedLoad.feedLoadId==db.feedOrder.feedLoadId),
>>
>> db.feedOrderLine.on(db.feedOrder.feedOrderId==db.feedOrderLine.feedOrderId)]
>>
>> I get no fields from either feedOrder or the feedOrderLine tables, only 
>> fields from feedLoad.
>>
>> -Jim
>>
>> On Friday, January 18, 2013 5:39:03 AM UTC-6, DenesL wrote:
>>>
>>> Hi Jim,
>>>
>>> from the book:
>>> "Multiple left joins can be combined by passing a list or tuple of 
>>> db.mytable.on(...) to the left attribute."
>>>
>>> Denes
>>>
>>

-- 





[web2py] Re: Saving language files

2013-01-23 Thread Massimo Di Pierro
Please open a ticket about this.

On Wednesday, 23 January 2013 05:33:45 UTC-6, Ramos wrote:
>
> Hello
>
> I live in Portugal, and i have to edit my language files sometimes.
>
> After editing i have to scroll all way down to 
> save the file.
>
>
> Can you place a "follow me" save button instead?
>
> Thank you
> António
>

-- 





[web2py] Re: anyserver.py not working properly for gevent

2013-01-23 Thread Massimo Di Pierro
Thank you for bringing this up. It is a serious issue. I think I have fixed 
this in trunk in anyserver. Can you check my solution is acceptable?

On Wednesday, 23 January 2013 01:09:48 UTC-6, JimK wrote:
>
> Since gluon.main and gluon.fileutils are being imported before 
> gevent's monkey.patch_all() is run, the sessions were getting mixed up.
>
> Here's the code I used that verified the issue (found on this forum):
>
> def index():
> import time
> from gluon import current
> print current.request.uuid
> time.sleep(10)
> print current.request.uuid
> return dict(done='done!')
>
> Load this method in 2 different browsers within 10 seconds and you'll see 
> that the uuids are out of sync.
>
> It should be:
> A
> B
> A
> B
>
> But instead you get:
> A
> B
> B
> B
>
> To fix this, I created a separate file that just starts the gevent server. 
>  Essentially, before importing the gluon modules, I run:
> from gevent import monkey
> monkey.patch_all()
>
> After running the test again, I get:
> A
> B
> A
> B
>
> So, should we remove gevent from anyserver.py and add gevent_server.py? 
>  This would save others from encountering the same issue that I did.
>

-- 





[web2py] Re: is bug? sqlform.factory

2013-01-23 Thread www.diazluis.com
thanks for the reply
I understood the point of view.

only had the doubt.
I thought it could be a mistake.
but at this point, is, that the matter be referred to the database.

-- 





[web2py] Re: Possible bug in date format widget

2013-01-23 Thread Niphlod
check the source of your page (or print somewhere in it {{=T('%Y-%m-%d')}}).
'%Y-%m-%d' is just a *placeholder *for the T operator: that T() translates 
whatever value it's assigned to the key '%Y-%m-%d' . that little line 
in web2py_ajax.html "passes" the *translated *value to the javascript 
variable w2p_ajax_date_format i.e. 

for it users web2py_ajax.html should render var w2p_ajax_date_format = 
'%d/%m/%Y'

https://github.com/web2py/web2py/blob/master/applications/welcome/languages/it.py#L12

while for cs users should render w2p_ajax_date_format = '%d.%m.%Y'

https://github.com/web2py/web2py/blob/master/applications/welcome/languages/cs.py#L9

etc etc etc

tl;dr usually you don't change the format acting on web2py_ajax.html, you 
edit the language file corresponding to your locale settings.

On Wednesday, January 23, 2013 12:20:05 PM UTC+1, Ramos wrote:
>
> Hello i my web2py_ajax.html i see
>
>  var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";
>
> But in a sqlform.factory generated form if i select a day in the widget it 
> pastes the date as 01-01-2013 ignoring the format
>
> however if i change the format to
>
>  var w2p_ajax_date_format = "{{=T('%Y*/*%m*/*%d')}}";
>
> it pastes the date as 2013/01/01
>
> Is this a bug?
>
> Thank you
>
> António
>

-- 





[web2py] Sqlform.smartgrid does not show link to uploaded file

2013-01-23 Thread António Ramos
Hello

my code


form=SQLFORM.factory(db.trabalhador,db.t_docs,
submit_button="Gravar",

fields=['nome','bi','ncart','ncartval','apt_medica','apt_medicaval','val_formacao','f_doc'],
table_name='trabalhador')


and in my view on of the fields "apt_medica" is an upload type field.

It does not show the link to get the file.


How to show it?

Thank you


António

-- 





[web2py] Saving language files

2013-01-23 Thread António Ramos
Hello

I live in Portugal, and i have to edit my language files sometimes.

After editing i have to scroll all way down to save
the file.


Can you place a "follow me" save button instead?

Thank you
António

-- 





[web2py] Possible bug in date format widget

2013-01-23 Thread António Ramos
Hello i my web2py_ajax.html i see

 var w2p_ajax_date_format = "{{=T('%Y-%m-%d')}}";

But in a sqlform.factory generated form if i select a day in the widget it
pastes the date as 01-01-2013 ignoring the format

however if i change the format to

 var w2p_ajax_date_format = "{{=T('%Y*/*%m*/*%d')}}";

it pastes the date as 2013/01/01

Is this a bug?

Thank you

António

-- 





Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-23 Thread Niphlod
ok, I'll test it more @home and then add a commented section to the script

PS: that site you posted . turn off response.optimize_js = 'inline' 
pleeease :P

On Wednesday, January 23, 2013 11:19:34 AM UTC+1, Paolo valleri wrote:
>
> Just tested, it works, I've already upgraded the production server too :-P
> I would suggest to add it (maybe as a comment) to the script.
> Thanks, Paolo
>
>
> 2013/1/22 Niphlod >
>
>> maybe I have a fix .
>> Can you please test it ?
>> assuming an example of routes.py like
>>
>> myapp = dict(languages=['en', 'it', 'jp'], default_language='en')
>>
>>
>> this means that navigating to:
>>  /myapp/ --> the static files will be referenced as 
>> web2py_home/applications/myapp/en/static/whatever.css
>>  /myapp/it/ --> the static files will be referenced as 
>> web2py_home/applications/myapp/it/static/whatever.css
>>
>> however, direct requests to /myapp/static/whatever.css should map to 
>> web2py_home/applications/myapp/en/static/whatever.css
>>
>> additionally, if /myapp/it/static/whatever.css is requested, if not found 
>> web2py_home/applications/myapp/static/whatever.css should be served.
>>
>> Now, I think that adding this section before the standard one will fix 
>> the issue
>>
>> location ~* /(\w+)/(en|it|jp)/static/(.*)$ {
>> alias /home/www-data/web2py/applications/$1/;
>> try_files static/$2/$3 static/$3 =404;
>> }
>>
>> (en|it|jp) here is the regex matching the "languages" list of the routes 
>> app's dict  This will set for the request /myapp/it/static/whatever.css 
>>   the alias to the web2py_home/applications/myapp/ and then try to serve 
>> static/it/whatever.css, if not found, it will fall back to a "normal" 
>> static/whatever.css, and if that one is not found will return a 404.
>>
>> @Jonathan: please stop me if I did miss something in the routes logic
>> @all : seems a simple fix - maybe too simple... please help test it
>>
>>
>> On Tuesday, January 22, 2013 9:14:26 PM UTC+1, Niphlod wrote:
>>>
>>> got it. can you post the routes.py you're using ?
>>>
>>> The problem lies in the fact that routes.py is really flexible and 
>>> adapting that logic using only rewrite or alias statements in nginx is 
>>> cumbersome.
>>> Standing on one feet (i.e. without tests) I'd say that the regex 
>>> checking static files
>>>
>>> location ~* /(\w+)/static/ {
>>> root /home/www-data/web2py/**applications/;
>>> #remove next comment on production
>>>
>>> #expires max;
>>> }
>>>
>>> is catching it as the app name and not the language "trick" . so, for a 
>>> request going to /it/app/static/whatever.css is looking into 
>>>
>>>
>>> /home/www-data/web2py/**applications/*it/*appname/**static/whatever.css 
>>> instead of  . (remove the bold part, "*it/*").
>>>
>>> If you remove those lines web2py will take charge for static files 
>>> serving, so the issue will be temporarily fixed.
>>>
>>> I'll try to set up some additional rules to make nginx behave like 
>>> routes.py, but it will take some time.
>>>
>>> PS: please mind that the script it's a template it's not meant to 
>>> fullfill every custom installation patterns out there without further 
>>> tuning.
>>> language routing is probably the most difficult out there because for a 
>>> request
>>> /it/appname/static/**whateverfile.css
>>> web2py looks into /web2py/appname/static/it/**whateverfile.css and then 
>>> if not found into /web2py/appname/static/**whateverfile.css (a nice 
>>> fallback, but hard to map with a simple nginx statement)
>>>
>>> On Tuesday, January 22, 2013 6:14:55 PM UTC+1, Paolo valleri wrote:

 Hi Massimo, for example, if I visit this traffic.integreen-life.bz.it/*
 *default/wiki/about
  (default is the controller and wiki is the function) it works while 
 traffic.integreen-life.bz.it/**it/default/wiki/aboutthe
  application works very well but the static links do not.

 Paolo


 2013/1/22 Massimo Di Pierro 

> can you show an example?
>
>
> On Tuesday, 22 January 2013 07:36:39 UTC-6, Paolo valleri wrote:
>
>> Hi all, I've just discovered that the regex used to retrieve the 
>> static files doesn't work if I use languages abbreviation in urls.
>> How can we fix this?
>>
>>
>>
>> 2012/12/28 Richard Vézina 
>>
>>>  Hello,
>>>
>>> I publish a new script that allow deployment of Redmine beside 
>>> web2py.
>>>
>>> Here : https://groups.google.com/**fo**rum/?fromgroups=#!searchin/**
>>> web**2py/redmine/web2py/**ZqL7Si8Khbo**/Es-wK1yXdgQJ
>>>
>>> Notice : After some read, I choose Unicorn over Phussion Passenger.
>>>
>>> Richard
>>>
>>>
>>> On Thu,

Re: [web2py] Re: new setup-web2py-nginx-uwsgi-ubuntu.sh

2013-01-23 Thread paolo.vall...@gmail.com
Just tested, it works, I've already upgraded the production server too :-P
I would suggest to add it (maybe as a comment) to the script.
Thanks, Paolo


2013/1/22 Niphlod 

> maybe I have a fix .
> Can you please test it ?
> assuming an example of routes.py like
>
> myapp = dict(languages=['en', 'it', 'jp'], default_language='en')
>
>
> this means that navigating to:
>  /myapp/ --> the static files will be referenced as
> web2py_home/applications/myapp/en/static/whatever.css
>  /myapp/it/ --> the static files will be referenced as
> web2py_home/applications/myapp/it/static/whatever.css
>
> however, direct requests to /myapp/static/whatever.css should map to
> web2py_home/applications/myapp/en/static/whatever.css
>
> additionally, if /myapp/it/static/whatever.css is requested, if not found
> web2py_home/applications/myapp/static/whatever.css should be served.
>
> Now, I think that adding this section before the standard one will fix the
> issue
>
> location ~* /(\w+)/(en|it|jp)/static/(.*)$ {
> alias /home/www-data/web2py/applications/$1/;
> try_files static/$2/$3 static/$3 =404;
> }
>
> (en|it|jp) here is the regex matching the "languages" list of the routes
> app's dict  This will set for the request /myapp/it/static/whatever.css
>   the alias to the web2py_home/applications/myapp/ and then try to serve
> static/it/whatever.css, if not found, it will fall back to a "normal"
> static/whatever.css, and if that one is not found will return a 404.
>
> @Jonathan: please stop me if I did miss something in the routes logic
> @all : seems a simple fix - maybe too simple... please help test it
>
>
> On Tuesday, January 22, 2013 9:14:26 PM UTC+1, Niphlod wrote:
>>
>> got it. can you post the routes.py you're using ?
>>
>> The problem lies in the fact that routes.py is really flexible and
>> adapting that logic using only rewrite or alias statements in nginx is
>> cumbersome.
>> Standing on one feet (i.e. without tests) I'd say that the regex checking
>> static files
>>
>> location ~* /(\w+)/static/ {
>> root /home/www-data/web2py/**applications/;
>> #remove next comment on production
>> #expires max;
>> }
>>
>> is catching it as the app name and not the language "trick" . so, for a 
>> request going to /it/app/static/whatever.css is looking into
>>
>> /home/www-data/web2py/**applications/*it/*appname/**static/whatever.css 
>> instead of  . (remove the bold part, "*it/*").
>>
>> If you remove those lines web2py will take charge for static files
>> serving, so the issue will be temporarily fixed.
>>
>> I'll try to set up some additional rules to make nginx behave like
>> routes.py, but it will take some time.
>>
>> PS: please mind that the script it's a template it's not meant to
>> fullfill every custom installation patterns out there without further
>> tuning.
>> language routing is probably the most difficult out there because for a
>> request
>> /it/appname/static/**whateverfile.css
>> web2py looks into /web2py/appname/static/it/**whateverfile.css and then
>> if not found into /web2py/appname/static/**whateverfile.css (a nice
>> fallback, but hard to map with a simple nginx statement)
>>
>> On Tuesday, January 22, 2013 6:14:55 PM UTC+1, Paolo valleri wrote:
>>>
>>> Hi Massimo, for example, if I visit this traffic.integreen-life.bz.it/**
>>> default/wiki/about 
>>> (default is the controller and wiki is the function) it works while
>>> traffic.integreen-life.bz.it/**it/default/wiki/aboutthe
>>>  application works very well but the static links do not.
>>>
>>> Paolo
>>>
>>>
>>> 2013/1/22 Massimo Di Pierro 
>>>
 can you show an example?


 On Tuesday, 22 January 2013 07:36:39 UTC-6, Paolo valleri wrote:

> Hi all, I've just discovered that the regex used to retrieve the
> static files doesn't work if I use languages abbreviation in urls.
> How can we fix this?
>
>
>
> 2012/12/28 Richard Vézina 
>
>>  Hello,
>>
>> I publish a new script that allow deployment of Redmine beside web2py.
>>
>> Here : https://groups.google.com/**fo**rum/?fromgroups=#!searchin/**
>> web**2py/redmine/web2py/**ZqL7Si8Khbo**/Es-wK1yXdgQJ
>>
>> Notice : After some read, I choose Unicorn over Phussion Passenger.
>>
>> Richard
>>
>>
>> On Thu, Dec 20, 2012 at 9:57 AM, Massimo Di Pierro <
>> massimo@gmail.com> wrote:
>>
>>> please email me the patch of latest file when ready for inclusion.
>>>
>>>
>>> On Thursday, 20 December 2012 03:18:20 UTC-6, Niphlod wrote:

 perfect, Ccing Massimo on this final one.

 Il giorno giovedì 20 dicembre 2012 00:16:25 UTC+1, Paolo ha scritto:
>>>