[web2py] Re: Customizing Fields the lazy way

2018-04-15 Thread Joe Barnhart
Actually, I borrowed Anthony's excellent idea and made a "factory" class for my field definitions. First I defined a factory class: class Field_Factory(object): from gluon import Field @staticmethod def new(**kwargs): default = dict(**kwargs) def inner(name, **kwargs)

[web2py] MySql deprecation of NO_AUTO_CREATE_USER

2018-04-15 Thread Joe Barnhart
Anybody else seeing this? .../gluon/contrib/pymysql/cursors.py:166: Warning: (3090, u"Changing sql mode 'NO_AUTO_CREATE_USER' is deprecated. It will be removed in a future release.") This Is showing up on the console while running version 2.16.1-stable+timestamp.2017.11.13.23.50.07 Just curio

[web2py] Re: Requires web2py 2.15.5 or newer?

2018-04-15 Thread 黄祥
you can comment or delete the code in models/db.py (around line 15-16) *e.g. in web2py version 2.16.1* if request.global_settings.web2py_version < "2.15.5": raise HTTP(500, "Requires web2py 2.15.5 or newer") best regards, stifan -- Resources: - http://web2py.com - http://web2py.com/book (Doc

[web2py] Requires web2py 2.15.5 or newer?

2018-04-15 Thread Tarek Doha
Hello, How to solve this? Requires web2py 2.15.5 or newer -- 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 subs

[web2py] Re: SQLFORM.grid: represent a field with IS_IN_SET validator by its label instead of its value

2018-04-15 Thread Anthony
The validator controls the widget used in forms but no the format in the grid -- for the latter, use the "represent" attribute: represent=lambda v, r: GENDER[v] Anthony On Sunday, April 15, 2018 at 4:47:27 AM UTC-4, xelomac wrote: > > Consider the following example. > > Model: > > GENDER = {"ma

Re: [web2py] Re: Problem with a virtual field, SQLFORM.grid and the fields parameter

2018-04-15 Thread Anthony
Looks like a bug. Feel free to open a Github issue. Anthony On Sunday, April 15, 2018 at 6:47:46 AM UTC-4, mweissen wrote: > > Yes, that is possible. > > def t(): > db.tt.f.readable = False > form = SQLFORM.grid(db.tt) > return dict(form=form) > > > > But now there is the next problem

Re: [web2py] How to retrieve info about sessions when they are stored in Redis?

2018-04-15 Thread Lisandro
Thank you very much Richard! With your help I was able to retrieve the keys of the sessions stored in Redis with this simple line of code: session_keys = cache.redis.r_server.smembers('w2p:sess:%s:id_idx' % application_name) That line returns a set with all the session keys stored in Redis. Not

[web2py] Re: StackShare

2018-04-15 Thread 黄祥
yeah, 3 years later, web2py still not listed in stackshare, just interest what's another technology can be integrate with web2py listed in stackshare ref: https://stackshare.io/submit cheers, stifan On Friday, April 3, 2015 at 5:40:59 AM UTC+7, Louis Amon wrote: > > Just pointing out that web2p

Re: [web2py] Re: Problem with a virtual field, SQLFORM.grid and the fields parameter

2018-04-15 Thread Martin Weissenboeck
Yes, that is possible. def t(): db.tt.f.readable = False form = SQLFORM.grid(db.tt) return dict(form=form) But now there is the next problem. I try to use the Export "CSV" button and I get another eooror: Ticket ID 194.118.190.134.2018-04-15.12-45-01.b4d5db05-e1e0-40b8-9233-47f2a2

[web2py] SQLFORM.grid: represent a field with IS_IN_SET validator by its label instead of its value

2018-04-15 Thread xelomac
Consider the following example. Model: GENDER = {"male": T("Mr.", lazy=False), "female": T("Ms.", lazy=False)} db.define_table('person', Field('gender', label = T('Salutation'), requires=IS_IN_SET(GENDER)), Field('first_name', label = T('First Name'), Field('last_name', l

Re: [web2py] Re: auth decorator with rest api

2018-04-15 Thread yogeshwar khalkar
The site is served by angular and angular calling the web2py API but, the site is not online to show you. If someone worked on this scenario Please give me some pointers. ‌ Thanks, Yogeshwar On Sat, Apr 14, 2018 at 11:51 PM, Anthony wrote: > Hard to say what is going on. Would have to see