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
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
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
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
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
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
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')
>
>
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
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":
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
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
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
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
{{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
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
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:
>
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
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
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
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
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
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
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)
---
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
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
25 matches
Mail list logo