[web2py] Re: simple_hash and salt order

2016-05-26 Thread Anthony
Aside from forking the framework, I suppose you could take one of these approaches: 1. Monkey patch gluon.utils.simple_hash. 2. Subclass validators.CRYPT and validators.LazyCrypt, and in LazyCrypt, replace the __str__ method with one that calls a custom simple_hash function. 3.

[web2py] web2py 1.89.5

2016-05-26 Thread Roman Molotkovski
I've been looking for old versions of python and but I can't find anything older than 2.0.2 (on github). A previous thread in this group mentioned this link : h ttp://code.google.com/p/web2py/source/list which was supposedly referring to older

[web2py] Re: readonly field only in SQLFORgrid edit page if field is not empty

2016-05-26 Thread Anthony
def list_order_type(): if 'edit' in request.args: record = db.foobar(request.args(-1, cast=int)) older_than_an_hour = record.created_on < request.now - datetime. timedelta(hours=1) db.foobar.text.writable = not (record.text and older_than_an_hour) form =

[web2py] Re: File permission issues when running script as scheduler

2016-05-26 Thread lamest . email . ever
Thank you for your response. I did run the scheduler process as www-data and it was able to open the file, however, new error on the database insert. scheduler_run table shows status of TIMEOUT on the task, but the timeout is set to zero, which should be unlimited? This script takes about 5

[web2py] Error during scheduled job

2016-05-26 Thread Andre Kozaczka
I'm seeing this error occasionally from my scheduler: File "/usr/lib/python2.7/ssl.py", line 341, in recv return self.read(buflen) File "/usr/lib/python2.7/ssl.py", line 260, in read return self._sslobj.read(len) File "/home/andre/web2py/gluon/scheduler.py", line 702, in

[web2py] Scheduler menu empty (on purpose?)

2016-05-26 Thread Scott Hunter
In the latest stable release (2.14.6), the Scheduler menu is empty. When I looked in widget.py, I see this: def update_schedulers(self, start=False): applications_folder = os.path.join(self.options.folder, 'applications') apps = [] ##FIXME - can't start scheduler in

[web2py] The built-in web2py wiki error

2016-05-26 Thread greenpoise
I had never done this part of the book but when I tried, it gave me an error: local variable 'gid' referenced before assignmentVersion web2py™ Version 2.14.6-stable+timestamp.2016.05.10.00.21.47 Python Python 2.7.11: /usr/bin/python2.7 (prefix: /usr)Traceback 1. 2. 3. 4. 5. 6. 7. 8. 9. 10.

[web2py] Re: (More complex) Aggregations in web2py and using SQLFORM.grid (DAL vs. SQL vs. pandas vs. ???)

2016-05-26 Thread villas
I think I understand and you are right, DBs normally require the fielded listed in the GROUP BY and ORDER BY too. However, the DAL enables you to build such queries, so I'm not sure what the problem is. However, I hope you have found a solution now. Best wishes. On Thursday, 26 May

Re: [web2py] Knowledge Base app that runs on web2py?

2016-05-26 Thread Richard Vézina
Not sure what you search exactly... There is web2pyref : http://www.web2pyref.com/ though I don't know if the app had been released for others to clone it over github for instance... There is also web2py slice, the same thing applies don't know if you can get the app and work from there... Also

[web2py] jquery conditional form at pg 505 in book doesn't work. What's the problem?

2016-05-26 Thread ktesr123456
this issue is listed but then it was having .attr and suggested to use .prop but the below example is using .prop already db = DAL('sqlite://db.db') db.define_table('taxpayer', Field('name'), Field('married', 'boolean'), Field('spouse'))

[web2py] Knowledge Base app that runs on web2py?

2016-05-26 Thread Marius
Hi, Is there an up-to-date knowledge base app around that runs on web2py? Also, documented? Thanks in advance, Marius -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

Re: [web2py] Re: Web2py, nginx, installation on Raspberry Pi

2016-05-26 Thread Massimo Di Pierro
replace IP.IP.IP.IP with 0.0.0.0 On Thursday, 26 May 2016 00:21:18 UTC-5, Ben Lawrence wrote: > > Never mind. I can just use > > http://purschel.eu/python/web2py-on-raspberry-pi-raspbian/ > > login as pi user (any user, not root) and enter following commands: > > sudo apt-get install

[web2py] turning web2py apps into mobile apps

2016-05-26 Thread Massimo Di Pierro
Anybody used this? https://gonative.io/ seems like a great way to create mobile apps from web2py apps. trying it now.. -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list

[web2py] Re: web2py and Spatial / GIS support

2016-05-26 Thread Ron Chatterjee
I share your frustration Niphlod and I am with you on this. I see all these posts about os, boy with a new toy but barely about how we do certain things given what's already there. On Thursday, May 26, 2016 at 3:18:12 PM UTC-4, Niphlod wrote: > > I don't want to push anyone away but if the

[web2py] Re: web2py and Spatial / GIS support

2016-05-26 Thread Niphlod
I don't want to push anyone away but if the underlying statement is "I need this ready to go" and a library-framework-whatever doesn't contain it, then there's really nothing anyone can do. Nobody ever said that web2py is a silver bullet (nor is it django, flask, express, sails, rails, cakephp,

[web2py] Re: (More complex) Aggregations in web2py and using SQLFORM.grid (DAL vs. SQL vs. pandas vs. ???)

2016-05-26 Thread stex76
Hi villas, perhaps my "problem" is: if you group/aggregate in SQL, you are allowed only to put attributes in the select-clause which are either grouped (i.e. which also appear in the group-clause) or which are aggregated (e.g. with sum, max, min, avg) at least as far as my knowledge goes. The

[web2py] Re: readonly field only in SQLFORgrid edit page if field is not empty

2016-05-26 Thread Val K
Where and how can I set the db.foobar.text.writable = False? request.args(1) = 'edit' On Thursday, May 26, 2016 at 12:46:45 PM UTC+3, Mike Constabel wrote: > > Hello, > > I try to find a solutiuon for a hopefully simple problem. > > Example: > > db.define_table("foobar", > Field("uuid",

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2016-05-26 Thread Val K
Hi! As I understand *requires() * designed to decorate and *back* redirection after login, so it ignores *auth.settings.login_next * If you want to redirect after login just do it from your *check_condition()* directly On Thursday, May 26, 2016 at 5:15:15 PM UTC+3, 黄祥 wrote: > >

[web2py] simple_hash and salt order

2016-05-26 Thread David Orme
Hello, I've got an application where I'm sharing a database with a second (non web2py) framework. I want my web2py application to handle user registration and would like to avoid users having two passwords (partly so that only web2py ever writes to the auth_user table). Inevitably, the hashed

[web2py] Re: web2py and Spatial / GIS support

2016-05-26 Thread Pierre
I thought GIS/Geolocation is something fancy / highly desirable ? It also implies some important aspects of life .. the GIS function i miss is *st_transform* (POSTGIS) which i can test in depth if implemented. It won't be a drama if it's not as there are workarounds via *pyproj* or

[web2py] Re: Very simple issue: redirect on login - auth.settings.login_next

2016-05-26 Thread 黄祥
follow the instruction is working well, thank you, but when i tried to add the condition it didn't work. e.g. *controllers/default.py* *"""* *not work because of this* *def check_condition(): * *auth.settings.login_next = URL('user/profile')* *if request.function != 'user':* *

[web2py] Re: how to resend verification email?

2016-05-26 Thread Alexandru Asimionese
def resend_email_verification(): url = 'https://' + request.env.http_host+URL('default','user',args=['verify_email']) + '/'+ auth.user.registration_key mail.send(to=auth.user.email, subject=T('confirm your email'), message='click this link to finish creating your account:' + url)

[web2py] Re: File permission issues when running script as scheduler

2016-05-26 Thread Niphlod
if your files are created by the www-data process and are not for anyone else to touch, the problem will rise. you can't expect an app running in the same permission env on www-data to behave (permission-wise) as one running on your user ("fivestar", I guess?) study your permission (start with

[web2py] Re: Set Scheduler Run Timeout on Try Except

2016-05-26 Thread Niphlod
Frankly it's not clear what you want to achieve. That being said you have a timeout on the task itself and an api to stop a running task. Not sure what you need in addition to those... On Thursday, May 26, 2016 at 4:28:40 AM UTC+2, Andrew Evans wrote: > > Hello, I am running a scheduler that I

[web2py] Re: web2py deployment: LetsEncrypt Nginx auto renew deployment script

2016-05-26 Thread Niphlod
better than http, for sure. Better than self-signed, an order of magnitude. But still I'd go for 60$ for basic cert for a production site rather than using letsentcypt. On Thursday, May 26, 2016 at 12:11:29 AM UTC+2, Mark Graves wrote: > > Has anyone used LetsEncrypt certificates or followed

[web2py] Re: is such work with current.T() correct and safe?

2016-05-26 Thread Anthony
On Thursday, May 26, 2016 at 5:27:38 AM UTC-4, Mirek Zvolský wrote: > > I hope this is better: > > from gluon import current > from gluon.validators import IS_NOT_EMPTY, IS_IN_DB > class IS_NOT_EMPTY_(IS_NOT_EMPTY): >def __init__(self): >super(IS_NOT_EMPTY_,

[web2py] readonly field only in SQLFORgrid edit page if field is not empty

2016-05-26 Thread Mike Constabel
Hello, I try to find a solutiuon for a hopefully simple problem. Example: db.define_table("foobar", Field("uuid", "string"), Field("text", "string"), Field('created_on', "datetime", default=request.now)) def list_order_type(): form = SQLFORM.grid(db.foobar) return

[web2py] Re: is such work with current.T() correct and safe?

2016-05-26 Thread Mirek Zvolský
.__init__(*args, error_message=current.T('choose one or more', **kwargs)) in last Dne čtvrtek 26. května 2016 11:27:38 UTC+2 Mirek Zvolský napsal(a): > > I hope this is better: > > from gluon import current > from gluon.validators import IS_NOT_EMPTY, IS_IN_DB > class IS_NOT_EMPTY_(IS_NOT_EMPTY):

[web2py] Re: is such work with current.T() correct and safe?

2016-05-26 Thread Mirek Zvolský
I hope this is better: from gluon import current from gluon.validators import IS_NOT_EMPTY, IS_IN_DB class IS_NOT_EMPTY_(IS_NOT_EMPTY): def __init__(self): super(IS_NOT_EMPTY_, self).__init__(error_message=current.T('this is required')) class IS_IN_DB_(IS_IN_DB): def __init__(self,

[web2py] Re: is such work with current.T() correct and safe?

2016-05-26 Thread Mirek Zvolský
Thank you very much, Anthony. Just the first sentence "...The purpose of translation is to translate strings based on the requested language of a given HTTP request" is enough to understand my stupid mistake. Dne středa 25. května 2016 12:21:35 UTC+2 Mirek Zvolský napsal(a): > > I