[web2py] 'str' object has no attribute 'year'

2016-11-16 Thread 'Annet' via web2py-users
In a table I defined the following field: Field('birthday', writable=False, readable=False, **isemptyorisdate), isemptyorisdate has been defined like this: isemptyorisdate = dict(type='date', default='', requires=IS_EMPTY_OR(IS_DATE(format='%d-%m-%Y', error_message

Re: [web2py] Re: Graph Model (proposal to contribute)

2016-11-16 Thread Andrew Willimott
Here's a start: https://github.com/willimoa/welcome_d3 > -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are sub

[web2py] Re: strange behavior of $@ bash parameter expansion

2016-11-16 Thread Mirek Zvolský
Thank you, Niphlod. Can you help me with the Web2py upgrade ? Because I think there are some fatal problems in Web2py code. Basically appadmin will start well, but fails after Web2py restart with corrupted scheduler. I want move from 2.14.6 to trunk. (because 2.14.6 has strange gluon/main.py ln

[web2py] Re: Text area input field DAL question

2016-11-16 Thread Pierre
you could use a html tag instead of a : {{=event}} http://www.w3schools.com/tags/tag_pre.asp or you could include a TEXTAREA web2py helper in the : {{=TEXTAREA(event)}} you should also set this helper to* readonly* to prevent user interaction with it there are probably other option

Re: [web2py] lastName, firstName in form

2016-11-16 Thread Richard Vézina
.strip() Richard On Wed, Nov 16, 2016 at 2:29 AM, 'Annet' via web2py-users < web2py@googlegroups.com> wrote: > I have a form in which the user enter his name, for example: 'Thompson, > Brian' > > When I execute the following query: > > rowset = db(db.vtx_vertex.name.ilike(nameform.vars.name)) >

[web2py] what is in the cache ?

2016-11-16 Thread Pierre
how do I retrieve a key,value pair stored in the redis cache ? am doing this : message = cache.redis('message', lambda: 'Hello', time_expire=360) now i want to test that key='message' still exists and get its value ? -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) -

Re: [web2py] 'str' object has no attribute 'year'

2016-11-16 Thread Richard Vézina
Could it be possible that default value is wrong? Wouldn't better be None? It a bit difficult to say what the problem is without the full table definition and full traceback (at least more detailed one). Richard On Wed, Nov 16, 2016 at 3:35 AM, 'Annet' via web2py-users < web2py@googlegroups.com>

Re: [web2py] Re: Graph Model (proposal to contribute)

2016-11-16 Thread Richard Vézina
Could we keep both rendering mechanism graphviz + d3? On Wed, Nov 16, 2016 at 4:38 AM, Andrew Willimott wrote: > Here's a start: > https://github.com/willimoa/welcome_d3 > > > > >> -- > Resources: > - http://web2py.com > - http://web2py.com/book (Documentation) > - http://github.com/web2py/web2p

Re: [web2py] lastName, firstName in form

2016-11-16 Thread Richard Vézina
Here what I usually do for search in user field name : search_val = request.vars.txtSearch rows = db(((db.auth_user.registration_key != 'disabled') | (db.auth_user.registration_key == None)) & (db.auth_user.first_name.lower().like('%{0}%'.format(search_val.lower( | ((db.auth_use

Re: [web2py] Re: Graph Model (proposal to contribute)

2016-11-16 Thread António Ramos
+1 for D3 no need to install graphviz and pygraphviz on the server... 2016-11-16 13:56 GMT+00:00 Richard Vézina : > Could we keep both rendering mechanism graphviz + d3? > > On Wed, Nov 16, 2016 at 4:38 AM, Andrew Willimott > wrote: > >> Here's a start: >> https://github.com/willimoa/welcome_d3

[web2py] Re: strange behavior of $@ bash parameter expansion

2016-11-16 Thread Mirek Zvolský
In fact it is not migration problem. But fatal problem after adding scheduler (Postgres+Scheduler) 1. Clean new app created in /admin 2. Changed private/appconfig.ini to Postgres database (empty database I have created in pgAdmin) 3. Web2py + AppAdmin --> OK 4. added models/scheduler.py: import +

Re: [web2py] Re: Graph Model (proposal to contribute)

2016-11-16 Thread Ron Chatterjee
+1. Is it going to be standard on next upgrades? On Wednesday, November 16, 2016 at 9:58:35 AM UTC-5, Ramos wrote: > > +1 for D3 > no need to install graphviz and pygraphviz on the server... > > > 2016-11-16 13:56 GMT+00:00 Richard Vézina >: > >> Could we keep both rendering mechanism graphviz

[web2py] Re: Text area input field DAL question

2016-11-16 Thread Anthony
You can and should use XML(..., sanitize=True). If it is sanitizing any HTML tags or attributes that you want to preserve, you can configure the sanitizer via the "permitted_tags" and "allowed_attributes" arguments (see http://web2py.com/books/default/chapter/29/05/the-views#XML). Anthony On T

Re: [web2py] lastName, firstName in form

2016-11-16 Thread Anthony
It's probably a good idea to strip any leading/trailing whitespace before the names are ever inserted in the database. Anthony On Wednesday, November 16, 2016 at 9:28:56 AM UTC-5, Richard wrote: > > Here what I usually do for search in user field name : > > search_val = request.vars.txtSearch >

[web2py] Re: expiration vs long_expiration

2016-11-16 Thread Anthony
The long_expiration is only relevant if you have the "Remember me" option enabled, in which case it applies when the user selects that option. Anthony On Tuesday, November 15, 2016 at 5:07:02 PM UTC-5, 黄祥 wrote: > > is there any difference between expiration and long_expiration? > e.g. > auth.se

[web2py] conditional use of None

2016-11-16 Thread Alex Glaros
None is in the URL vars. http://127.0.0.1:8000/ES3/default/add_new_meeting_segment? specificAddressID=None how to handle None in conditional code in controller? Tried this: if request.get_vars.specificAddressID == None: #if user did not select an address then there is no FK to a db.Address

[web2py] Re: conditional use of None

2016-11-16 Thread Alfonso Serra
Have you tried?: if request.get_vars.specificAddressID == "None": Whatever you put in the url is not python, so specificAddressID=None is translated as a string. To translate it into python's None i think the url should be something like: http://127.0.0.1:8000/ES3/default/add_new_meeting_segmen

[web2py] Re: conditional use of None

2016-11-16 Thread Alex Glaros
works! Thanks Alfonso -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-

[web2py] Script timed out before returning headers for apache server when scheduler task is running

2016-11-16 Thread Pengfei Yu
Hi, I am using web2py as framework for my web application and using the built-in scheduler for the user tasks. They are working fine for more than one years. During the recent several days, I found that whenever I start a task to scheduler, the apache web server is not working, it is stuck in

[web2py] Re: expiration vs long_expiration

2016-11-16 Thread 黄祥
got it, thanks for detail explaination, anthony best regards, stifan -- 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 yo

[web2py] Re: Text area input field DAL question

2016-11-16 Thread 黄祥
thanks for the hints, anthony, forgot about permitted_tags and allowed_attributes arguments how to face the html comment for that? *e.g. :* permitted_tags = [' no error occured, but the result is not expected best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Docu