[web2py] Re: Value error when forcing AM/PM time with time field

2016-08-29 Thread H. Das
Ok I found the problem. It turns out if I use IS_NOT_EMPTY(), the submitted time field values get treated like a string rather than a datetime.time object. Instead I changed requires to IS_TIME to get the intended result. On Monday, August 29, 2016 at 10:00:21 PM UTC-4, H. Das wrote: > > Hello

[web2py] I have to manually refresh browser to see load data after submitting form.

2016-08-29 Thread Alex Glaros
What am I doing wrong? After posting a comment: First I see a "Success!" flash that I can't locate source of, and page doesn't refresh (load doesn't display). I hit "refresh page" and I see the correct session flash 'Comment Approved.' from my code and load data correctly displays. thanks, A

Re: [web2py] Re: Value error when forcing AM/PM time with time field

2016-08-29 Thread Kiran Subbaraman
Example usage for IS_TIME is detailed in the code: https://github.com/web2py/web2py/blob/a2354addec5a45ea6180528d2b8024588a106743/gluon/validators.py#L2125 Kiran Subbaraman http://subbaraman.wordpress.com/about/ On Tue, 30-08-2016 11:42 AM, H. Das wrote:

[web2py] Re: Value error when forcing AM/PM time with time field

2016-08-29 Thread H. Das
Unfortunately it doesn't look like IS_TIME has a format argument. That is odd. from the stacktrace: Field("start_time", "time", requires=IS_TIME(format="%I:%M")), TypeError: __init__() got an unexpected keyword argument 'format' On Tuesday, August 30, 2016 at 1:22:45 AM UTC-4, Dave S wrote: >

[web2py] Re: Value error when forcing AM/PM time with time field

2016-08-29 Thread Dave S
On Monday, August 29, 2016 at 7:00:21 PM UTC-7, H. Das wrote: > > Hello everyone, > > I defined a simple table with time fields like so: > > db.define_table("time_block", > Field("start_time", "time", requires=IS_NOT_EMPTY()), > Field("end_time", "time", requires=IS_NOT_EMPTY()), > ) > >

[web2py] Value error when forcing AM/PM time with time field

2016-08-29 Thread H. Das
Hello everyone, I defined a simple table with time fields like so: db.define_table("time_block", Field("start_time", "time", requires=IS_NOT_EMPTY()), Field("end_time", "time", requires=IS_NOT_EMPTY()), ) In jQuery I forced the time widget to show AM/PM like so: jQuery.timeEntry.se

[web2py] Re: one to many joins repeated parent

2016-08-29 Thread luis . valladares
Hello! Thanks for your help! but it means that for every record inside events table i should do an additional query in the modificators table, so if in a query i want to get 100 events and his modificators i should do 101 queries to the database, i think (im not sure, i'll will talk tomorrow wi

[web2py] Re: Best and simpler approach to Inline editing / deleting / appending (jqGrid, Jeditable,etc)

2016-08-29 Thread Henk huisman
Hi Clara, I have been looking for a powerful grid component too. Started using jqGrid. It's really nice and very powerful; I recommend it. Depends a bit on what license you looking for. For non-commercial organisations it's free. Henk > > > -- Resources: - http://web2py.com - http://

[web2py] Re: TAG helper and unnamed argument

2016-08-29 Thread Anthony
On Monday, August 29, 2016 at 6:46:33 PM UTC-4, Dave S wrote: > > > Continuing the side-comment: > > On Monday, August 29, 2016 at 2:37:53 PM UTC-7, Niphlod wrote: >> >> >> @mdipierro: [...] >> BTW2: the referenced page with >> the new style is a pain t

[web2py] Re: TAG helper and unnamed argument

2016-08-29 Thread Dave S
Continuing the side-comment: On Monday, August 29, 2016 at 2:37:53 PM UTC-7, Niphlod wrote: > > > @mdipierro: [...] > BTW2: the referenced page with > the new style is a pain to read > Scrolls very "slowly" for me ... mouse wheel or page down don't m

Re: [web2py] Re: Best and simpler approach to Inline editing / deleting / appending (jqGrid, Jeditable,etc)

2016-08-29 Thread Tim Richardson
I wonder if in that case you are better making lots of individual forms. That's what I would do. On 24 August 2016 at 07:08, WeiI Wang wrote: > Hi Tim, > > I tried the inline edit for sqlform grid. > The problem I have is there is only one submit button and whenever I edit > something and submit

[web2py] Re: TAG helper and unnamed argument

2016-08-29 Thread Niphlod
whoops, forget what I said. Apparently any attribute without a specific value is syntactically equivalent to "". So, @Kirill, there's no way but ending up with _pubdate='' will give you a syntactically equivalent markup. Unless I'm reading w3c spec wrong, in that case feel free to correct me. O

[web2py] Re: TAG helper and unnamed argument

2016-08-29 Thread Niphlod
ATM "False" or "None" don't have the corresponding attribute inserted. There's no way to generate an attribute without value. BTW: that is definitely not a good example as it's not HTML5 valid syntax. A better one could have been http://n.example.org/rfc4287";> hi @mdipierro: any thought

Re: [web2py] Re: DAL size limit for query?

2016-08-29 Thread Dave S
On Monday, August 29, 2016 at 1:25:33 PM UTC-7, goome wrote: > > > > >> moreover, i should 'append' the row to a pydal.objects.Rows > >> as to say > >> dati += row > >> but how can i do this? > >> > >> > > That one looks easy: data.append(row) > > but how can i create first 'data' as a

Re: [web2py] Re: DAL size limit for query?

2016-08-29 Thread Marcello Console
> >> moreover, i should 'append' the row to a pydal.objects.Rows >> as to say >> dati += row >> but how can i do this? >> >> > That one looks easy: data.append(row) but how can i create first 'data' as a pydal.objects.Rows? > > >> Thank you a lot again >> >> > Good luck! > > /dps > > >> >> 2016-

[web2py] TAG helper and unnamed argument

2016-08-29 Thread Kirill Shatalaev
So, how to do some like: 1 day ago I tried: TAG.time('1 day ago', _pubdate=True, _datetime=str(datetime.year) + '-' + '%02d' % datetime.month + '-' + '%02d' % datetime.day) And got: 1 day ago Here I can read: http://www.web2py.com/init/simple_examples/hello5 "attributes without val

[web2py] custom update form multiple tables and list:string

2016-08-29 Thread Yoel Benitez Fonseca
h! i got 2 tables, i need to make one update form for both, let's say they are: - db.define_table("item", ... Field('keywords', 'list:string', ...) ... ) db.define_table('concrete_item', Field('item_id', 'reference item'), ... ) - In the controller: - d

[web2py] Re: SQL10007N Message "0" could not be retrieved. Reason code: "3"

2016-08-29 Thread Dave S
On Sunday, August 28, 2016 at 5:41:16 PM UTC-7, elvis_x wrote: > > Hi All. > > I have a big problem to connect to my DB2 with nginx+uwsgi+web2py. > everything works fine via "python web2py.py -p 8080" > > If start my Webpage,i get this error: > > Error ticket for "init" > Ticket ID > > 127.0.0.1.

Re: [web2py] Re: DAL size limit for query?

2016-08-29 Thread Dave S
On Saturday, August 27, 2016 at 3:29:58 AM UTC-7, goome wrote: > > thank you for your answer and sorry for the delay, i had been some days > away. > > at this time the code that fails is: > tabella = request.args[0] > response.headers['Content-Type']='text/x-csv' > response.headers['Content-

[web2py] Re: new to python web2py

2016-08-29 Thread billmackalister
May be try this? def f1(f,v): widget = SQLFORM.widgets.string.widget(f,v,_placeholder='descripción'), return locals() Field("Description", "text", label='alguna cosa',requires=IS_NOT_EMPTY(),default=None,widget = f1), On Sunday, August 28, 2016 at 10:00:55 PM UTC-4, Anthony wrote: >

Re: [web2py] Re: Preceding backslash when using URL in ubuntu 16.04

2016-08-29 Thread Richard Vézina
You should consider using the script to properly install web2py : https://github.com/web2py/web2py/blob/master/scripts/setup-web2py-nginx-uwsgi-ubuntu.sh You can then work from this basic installation to secure it better and fine tune performance, configure proper database, etc. Richard On Mon,

[web2py] Re: Is 'Container' a Reserved Word?

2016-08-29 Thread Anthony
There should be no problem spreading your table definitions over multiple model files. However, the db object itself must be defined in a model file that is executed *before* any other model files in which tables are defined. You could name that model file something like 0.py to ensure it runs

[web2py] Re: one to many joins repeated parent

2016-08-29 Thread Mirek Zvolský
btw: your tables aren't large, but small. This will run well with SQLite on every hosting. Example: - Google App Engine NoSQL for free (with list:string fields for modificator) - Forpsi virtual server 20G SSD with Postgres (or just SQLite) http://www.forpsi.com/virtual/?lang=en-US for 1.2 EUR/m

[web2py] Re: one to many joins repeated parent

2016-08-29 Thread Mirek Zvolský
With pydal (ie. db=DAL()) you can get the records in 2 queries: event = db(db.events.id == wish_event_id).select() and event_modificators = db(db.modificator.events_id == wish_event_id).select() then convert to the list: event_modificators = [row for row in event_modificators]# item is whole

[web2py] Re: Preceding backslash when using URL in ubuntu 16.04

2016-08-29 Thread Mirek Zvolský
Hi, Web2py (I think) at this time has no pip/PyPI packaging and no Debian/Ubuntu packaging. All previous attempts are obsolete. In Debian apt (Jessie testing) apt I see python-web2py version 2.12.3-1. But we have 2.14.6 at web2py.com, Download. I think you should switch to current version, using

[web2py] Re: Reddit clone source code?

2016-08-29 Thread Brian Boatright
https://github.com/mdipierro/web2py-recipes-source/tree/master/source/02_building_your_first_applications/03_building_a_reddit_clone and the source code for the book is on github as well https://github.com/mdipierro/web2py-recipes-source/tree/master/source -- Resources: - http://web2py.com - htt

[web2py] Re: Is 'Container' a Reserved Word?

2016-08-29 Thread Brian Boatright
Thanks Anthony! All the db tables were defined in separate model files, which is what I would prefer, but as a last attempt to resolve the conflict I moved them all to a single models.py model file and arranged a few of the declarations to avoid that error. It is working now but I would have pr

[web2py] Re: Help with Patterns

2016-08-29 Thread Anthony
You might also consider putting these parameters in a query string rather than the URL path. That way, you could simply exclude parameters that are not being used for a given query (in web2py, missing query string variables will simply have the value None -- for example, if you attempt to access

[web2py] Re: Help with Patterns

2016-08-29 Thread Niphlod
are you talking about a general idea for the api ? I'd use 'all' ... On Monday, August 29, 2016 at 2:41:16 AM UTC+2, Diego Marinho wrote: > > I have this pattern: > > > "/jobs/year-start/{jobs.year_start.year}/amount-range-id/{jobs.amount_range_id}/neighbourhood-id/{jobs.neighbourhood_id}" > > I h

Re: [web2py] Re: I am trying to login from Phonegap app into my web2py app, what's wrong here?

2016-08-29 Thread Niphlod
technically though USERNAME is clear. so you need to query for username and just match the password with the crypted value. On Monday, August 29, 2016 at 3:05:20 AM UTC+2, Massimo Di Pierro wrote: > > This cannot be done. It is a feature not a bug. The purpose of the salt in > the hashed passwor

[web2py] Re: Recaptcha2 in custom form

2016-08-29 Thread 'Annet' via web2py-users
Hi Massimo, Thanks for your reply, problem solved nicely. Kind regards, Annet -- 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 messag