[web2py] Re: Slow TTFB debugging with Wing IDE

2016-04-08 Thread Niphlod
just call session.forget(response). You can read from the session as you like. session.forget() isn't going to add concurrency, it just not saves the session even in the event it got modifiedbut it still locks. On Thursday, April 7, 2016 at 9:12:13 PM UTC+2, MDSIII wrote: > > Thanks for the

[web2py] Add Image from static to pdf

2016-04-08 Thread Bogdan Iancic
I am generating a PDF on the fly, and I also want to add an image to it. The image is stored in static/images, but when I try to add it to my pdf, it says: raise IOError(\'Cannot open resource "%s"\' % name)\nIOError: Cannot open resource "logo.jpg"\n' I've tried it in three different ways, b

[web2py] Add image from static to pdf

2016-04-08 Thread Bogdan Iancic
I am generating a PDF on the fly, and I also want to add an image to it. The image is stored in static/images, but when I try to add it to my pdf, it says: raise IOError(\'Cannot open resource "%s"\' % name)\nIOError: Cannot open resource "logo.jpg"\n' I've tried it in three different ways, b

[web2py] Field or db.Field

2016-04-08 Thread 'Laer Cius' via web2py-users
Hi, I didn't see any reference to it in the documentation but I read now code which declare Field using the db.Field form : db.Field(name, 'string') Is there a (useful) difference with the simple Field declaration form : Field(name, 'string') ? Thank you -- Resources: - http://web2py

[web2py] Tracking user original referral URL

2016-04-08 Thread Joe
What is the best way to track HTTP_REFERER URL and store them in a session? Then, if the users submits the form I would like to save the HTTP_REFERER URL in the db. I would appreciate some guidance with this. Thanks very much. Cheers, Joe -- Resources: - http://web2py.com - http://web2py

[web2py] Re: Unable to update to new version old: 2.4.5 new: 2.13.4 (latest available at web2py site)

2016-04-08 Thread Mohan Paliwal
Finally the issue sorted out, the problem was jQuery version, updating the jQuery version to latest one worked. Thanks for all !!! On Saturday, April 2, 2016 at 11:46:58 AM UTC+5:30, Dave S wrote: > > > On Friday, April 1, 2016 at 12:45:07 PM UTC-7, Dave S wrote: >> >> On Friday, April 1, 2016 a

[web2py] Re: Field or db.Field

2016-04-08 Thread Anthony
Field('name') is the norm. Where have you seen db.Field()? Anthony On Friday, April 8, 2016 at 6:17:59 AM UTC-4, Laer Cius wrote: > > Hi, > > I didn't see any reference to it in the documentation but I read now code > which declare Field using the db.Field form : > > db.Field(name, 'string') > >

[web2py] Re: Field or db.Field

2016-04-08 Thread 'Laer Cius' via web2py-users
Here for example : https://joecodeswell.wordpress.com/2011/05/25/web2py-dal-quick-reference/ or in the pyforum2 code that you can find here : http://www.web2py.com/appliances I try to learn modifying it.. Thanks for your answer ! -- Resources: - http://web2py.com - http://web2py.com/book (Do

[web2py] Why is the sound not playing at all? What's the syntax error here?

2016-04-08 Thread Stephen Duisberg
def index(): # These code snippets use an open-source library. response_post = unirest.post("https://voicerss-text-to-speech.p.mashape.com/?key=key1";, headers={ "X-Mashape-Key": "key2", "Content-Type": "application/x-www-form-urlencoded" }, params={ "c": "mp3", "f":

[web2py] Re: Why is the sound not playing at all? What's the syntax error here?

2016-04-08 Thread Anthony
The src attribute is supposed to be a URL where an audio file can be found. If your unirest call retrieves an audio file, you would have to set up a separate controller action to retrieve the file via unirest and then stream it via response.stream -- the URL of *that* action would go in the src

[web2py] define custom style by class using SQLFORM

2016-04-08 Thread billmackalister
How do I change the style of a form using SQLFORM? form = SQLFORM(db.mytable, submit_button='Submit') form = SQLFORM(db.mytable, submit_button='Submit', _class = 'string_area'); #this dont work. form.element('input[type=text]').update(_class='btn btn-custom_two') #this will work but form looks

[web2py] (Apache + modwsgi) redirect non-www to www using htaccess or virtual directory?

2016-04-08 Thread Kenneth
Hello I've been trying to redirect non-www to www using htaccess but I was able to redirect only one domain when there are multiple applications/domains in applications directory. Is there anyone who was able to redirect non-www to www successfully? I wasn't able to find one correct solution

[web2py] If statement in View not processing correctly

2016-04-08 Thread Jeff Riley
Hello all. I have the following if statement in my views to try to eliminate empty fields that are displaying "None" in my views. I am not sure how to get the field value to evaluate the statement. Any help appreciated. {{if customer.address2 == "None":}} Apt/Suite: {{else:}} Apt/Sui

Re: [web2py] If statement in View not processing correctly

2016-04-08 Thread Richard Vézina
{{if customer.address2:}} Apt/Suite: {{=customer.address2}} {{else:}} Apt/Suite: {{pass}} On Fri, Apr 8, 2016 at 3:44 PM, Jeff Riley wrote: > Hello all. I have the following if statement in my views to try to > eliminate empty fields that are displaying "None" in my views. I am not > s

[web2py] Re: If statement in View not processing correctly

2016-04-08 Thread Dave S
On Friday, April 8, 2016 at 12:44:38 PM UTC-7, Jeff Riley wrote: > > Hello all. I have the following if statement in my views to try to > eliminate empty fields that are displaying "None" in my views. I am not > sure how to get the field value to evaluate the statement. Any help > appreciat

[web2py] Re: If statement in View not processing correctly

2016-04-08 Thread Anthony
None is a Python object, not a string value, so it would be: if customer.address2 is None: You could also do: if customer.address2: which will evaluate to False if the address is None or if it is an empty string (''). Anthony On Friday, April 8, 2016 at 3:44:38 PM UTC-4, Jeff Riley wrote: >

[web2py] Re: If statement in View not processing correctly

2016-04-08 Thread Jeff Riley
All thank you very much for the really fast responses. It turns out I had to use the "If customer.address2 is None:" statement. The "If customer.address2:" would not work for me. Again thank you all very much. On Friday, April 8, 2016 at 2:44:38 PM UTC-5, Jeff Riley wrote: > > Hello all. I h

[web2py] Re: If statement in View not processing correctly

2016-04-08 Thread Anthony
Sorry, it should have been: if not customer.address2: That will be True whenever customer.address2 is None or an empty string. Actually, there is an even better approach -- no need for an if/else block at all -- just use the following single line: Apt/Suite: {{=B(customer.address2) if customer

[web2py] Re: If statement in View not processing correctly

2016-04-08 Thread Leonel Câmara
That's the ternary operator in Python by the way -- 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 t

[web2py] Re: If statement in View not processing correctly

2016-04-08 Thread Jeff Riley
That is great Anthony and everyone else. Thank you very much for the fantastic help. On Friday, April 8, 2016 at 2:44:38 PM UTC-5, Jeff Riley wrote: > > Hello all. I have the following if statement in my views to try to > eliminate empty fields that are displaying "None" in my views. I am not

[web2py] storing IS_IN_SET items in appconfig.ini

2016-04-08 Thread Luca
Hi everyone, I'm new to web2py but learning fast, and building an online clients and tasks database for work, with some extra functionality. (similar to a CRM app...) When I restrict the values in a table field by assigning IS_IN_SET directly, it works (a proper itemized dropdown list appears

[web2py] Nginx setup not as recommended

2016-04-08 Thread 'Yan Wong' via web2py-users
The web2py Nginx setup page (http://web2py.com/books/default/chapter/29/13/deployment-recipes#Nginx) says to specify 'root' directory in two 'location' blocks, one for /xxx/static and one for simply / But this is "bad practice" according to the 2nd recommendation in the Nginx docs https://www

[web2py] files vanished

2016-04-08 Thread Sneka R
Hi, I have been using web2py for few days now. All the files I have created has vanished. What happened? -- 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) ---

[web2py] Re: How to join data from several tables into one jqgrid?

2016-04-08 Thread Niwar Benjeddy
I have the same problem ,pliz help Le mercredi 10 novembre 2010 07:32:58 UTC, Johann Spies a écrit : > > How do I provide a complex query which selects data from varius > tables to jqgrid? > > Regards > Johann > > -- > May grace and peace be yours in abundance through the full knowledge > of Go

Re: [web2py] files vanished

2016-04-08 Thread joseph simpson
Can you provide more details? What type of machine? What OS? What Web2py version? And so on.. On Wed, Apr 6, 2016 at 2:56 PM, Sneka R wrote: > Hi, > I have been using web2py for few days now. All the files I have created > has vanished. What happened? > > -- > Resources: > - http://web2py.co