[web2py] Use of scheduler in place of cron

2014-06-23 Thread pbreit
I have a function that I want to run every 30 minutes. I would ordinarily expect to use cron but see that the Web2py book encourages using the scheduler. But after reviewing the docs several times, I have no idea how to make this work. Thanks for any help. -- Resources: - http://web2py.com - h

[web2py] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-23 Thread Brian M
Looks like the new datatables.net v1.10 has a new API so there are now probably better ways to do this than I showed. On Monday, June 23, 2014 4:51:53 AM UTC-5, Tomeu Roig wrote: > > Thanks Brian > > El lunes, 23 de junio de 2014 03:56:32 UTC+2, Brian M escribió: >> >> Tomeu, >> >> At the moment

[web2py] Re: which web2py version contains the hypermedia api in gluon contrib?

2014-06-23 Thread LightDot
What's a bigger pointer than a big red button called "Git repository" or "Mercurial repository"..? They are right there, on the downloads page... :) Regards On Monday, June 23, 2014 10:43:46 PM UTC+2, greaneym wrote: > > Hi, > > Never mind, I found the version on github. Thanks ( There should

[web2py] Re: which web2py version contains the hypermedia api in gluon contrib?

2014-06-23 Thread greaneym
Hi, Never mind, I found the version on github. Thanks ( There should probably be a pointer from the downloads page on the main web2py site to github ). Margaret On Monday, June 23, 2014 10:42:32 AM UTC-5, greaneym wrote: > > Hello, > > I am interested in testing the hypermedia collectionjs co

[web2py] IS_IN_SET options list separator

2014-06-23 Thread Carlos Correia
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, Is there a way to introduce a separator in IS_IN_SET options widget, so that from code like: IS_IN_SET( ('1', 'First'), (seperator?), ('2', 'Second'),'3', 'Third') ) it produces something like this? First _ Second Third

[web2py] Re: Readonly elements (select and date field) respond to clicks, allow for changes and can be submitted?

2014-06-23 Thread 98ujko9
I did what you suggested but the calls to: db.owner.own_end_date.writable = False # not writable db.owner.own_end_date.readable = False # do not show is at all! are effective only if executed before the call to form = SQLFORM.smartgrid(db.owner, ... When executed after, have no effect. I want to

[web2py] which web2py version contains the hypermedia api in gluon contrib?

2014-06-23 Thread greaneym
Hello, I am interested in testing the hypermedia collectionjs combination in web2py. I downloaded 2.9.5-trunk+timestamp.2014.03.29.21.54.41 but it's not in the gluon/contrib. which version should I download to test please? thanks -- Resources: - http://web2py.com - http://web2py.com/book (Do

[web2py] /default/user/login not honoring "_next" anymore?

2014-06-23 Thread Wei Wang
In the current head branch in github (Version 2.9.5-trunk+timestamp.2014.06.19.17.16.40), it seems that the /default/user/login form does not use the "_next" variable specified in the URL. For example, The myapp/default/view is decorated with @auth.requires_login(), so when I am not logged in

Re: [web2py] Re: Hypermedia API and Collection+JSON in web2py

2014-06-23 Thread samuel bonill
patterns = [ ("posts/{post.id}", {"coments": {"author": "auth_user"}}] # My implementation parser = Rest.generate(patterns, args, kwargs) This automatically generate, the post with comments associate and user associated to a comment... What do you think about my idea ? 2014-06-23 9:50 GM

Re: [web2py] Re: Hypermedia API and Collection+JSON in web2py

2014-06-23 Thread samuel bonill
Thanks massimo, this is the point, generate many2many relations, with one request get all the information relations to a resource. I'm developing a plugin to generate great RESTful API based in many2many relations. inspired by the Instagram API

[web2py] Re: web2py and self-submission/postbacks - a newcomer asks

2014-06-23 Thread Anthony
It would probably help if you show some code, or at least explain in more detail an example where self submission is not possible or overly difficult. Note, your code can always distinguish between a form creation request and a form submission request by checking whether request.post_vars is No

Re: [web2py] Re: web2py and self-submission/postbacks - a newcomer asks

2014-06-23 Thread Jim Steil
I would handle setting defaults in the above example by setting the default value on the fields before the SQLFORM call like this: db.person.name.default = 'fieldvalue' -Jim On Mon, Jun 23, 2014 at 8:01 AM, Graham Ranson wrote: > Anthony writes: > > > If your going to use the web2py FORM or

[web2py] Re: web2py and self-submission/postbacks - a newcomer asks

2014-06-23 Thread Graham Ranson
Anthony writes: > If your going to use the web2py FORM or SQLFORM functionality, then the same code both defines and processes the form, so self submission makes sense. If you would rather build all of your form creation and processing code from scratch, then sure, do whatever you want. Anthon

[web2py] Re: upgraded and lost + - in string:list

2014-06-23 Thread Niphlod
np. Glad that the issue was located and fixed ^_^ On Monday, June 23, 2014 3:00:12 AM UTC+2, LoveWeb2py wrote: > > Issue resolved. Copied the web2py.js from the welcome app which had all > the right lines. Very very weird! Thank you so much for your help, Niphlod. > I didn't even think to check

[web2py] Re: Trying to use the LOAD helper, if a button is clicked

2014-06-23 Thread Tomeu Roig
Thanks Brian El lunes, 23 de junio de 2014 03:56:32 UTC+2, Brian M escribió: > > Tomeu, > > At the moment I'm just letting datatables.net enhance a plain html table > for me. One of these days I'll probably get around to giving it a json > datasource but so far it hasn't been a priority for my u

[web2py] Re: how to install facebookpython sdk in web2py

2014-06-23 Thread Massimo Di Pierro
talking about this: https://github.com/pythonforfacebook/facebook-sdk 1) install web2py from source 2) install git 3) git clone https://github.com/pythonforfacebook/facebook-sdk.git 4) cd facebook-sdk 5) sudo python setup.py install 6) done, you should be able to "import facebook" from web2py.

[web2py] Re: web2py password encryption/decryption

2014-06-23 Thread Massimo Di Pierro
Hello Farmy, The code you posted helps and this examples the PHP algorithm: http://pythonhosted.org/passlib/lib/passlib.hash.phpass.html I recorded this in Python: import random, hashlib class PHPHash(object): CHARS = '0123456789abcdefghijklmoqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ' def __

[web2py] Re: Readonly elements (select and date field) respond to clicks, allow for changes and can be submitted?

2014-06-23 Thread Massimo Di Pierro
That s what readonly means. readonly is an HTML attribute and has nothing to do with form processing. If you do not want them to appear in forms you have to tell the model: db.owner.own_end_date.writable = False # not writable db.owner.own_end_date.readable = False # do not show is at all! Mass

[web2py] Re: Undesired redirect to other page after submitting a form

2014-06-23 Thread Tom Clerckx
Anyone has observed this as well? Is this expected behavior? I understood the importance of giving a formname when you're dealing with two grids on one single page. This however concerns one single grid per page in which case I believe the formname is not required. It looks however that the l