[web2py] Re: Any problem in list:reference in 2.10 ?

2015-04-29 Thread Paolo Valleri
Hi, Can you try the fix I proposed in https://github.com/web2py/web2py/issues/946#issuecomment-9661 Paolo On Tuesday, April 28, 2015 at 9:26:23 PM UTC+2, Ariya Owam-aram wrote: > > Hi Everyone, > > I just upgrade to 2.10.4 and found error message when using filed > list:reference. > > APP :

[web2py] Re: Pydal ilike search inside a list of strings?

2015-04-29 Thread Paolo Valleri
Which postgres adapter are you using? Try - contains('%Smith') and (for case-insensitive query) - contains('%smith', case_sensitive=False) Paolo On Tuesday, April 28, 2015 at 9:26:24 PM UTC+2, Tom Stratton wrote: > > For me, with the postgres adapter, the "contains" method is only returning > i

[web2py] Re: Pydal ilike search inside a list of strings?

2015-04-29 Thread Niphlod
isn't the problem here that for list:string contains doesn't behave as a "like" but as the "contains" in python ?!?!?! On Wednesday, April 29, 2015 at 12:20:37 PM UTC+2, Paolo Valleri wrote: > > Which postgres adapter are you using? > Try > - contains('%Smith') > and (for case-insensitive query)

[web2py] Re: Form to get a value and process

2015-04-29 Thread Anthony
See answer on SO: http://stackoverflow.com/a/29932995/440323 On Tuesday, April 28, 2015 at 9:35:31 PM UTC-4, Aydin S wrote: > > It looks like the scheduler which is a model file does not see variable X > in the database! > > On Tuesday, 28 April 2015 21:19:14 UTC-4, Aydin S wrote: >> >> No, the v

[web2py] Re: How to capture auth_user.id during registration

2015-04-29 Thread Anthony
> > now it creates a duplicate auth_user record > Note, the line I provided should replace this line: db.auth_user.insert(**db.auth_user._filter_fields(form.vars)) If you're getting duplicate entries, I suspect you added my line rather than replacing the original. and still gives the value "N

[web2py] Bypassing Opening Dialog in Windows Binary Startup

2015-04-29 Thread Scott Hunter
If I run the Windows Binary without supplying an administrator password on the command line, web2py presents a dialog from which you can change the server address, port & admin password before starting the server; when the server is started, it opens its home page in the default browser, printin

[web2py] Re: Form to get a value and process

2015-04-29 Thread Aydin S
Thank you, you are right, right now I have: def index(): form = SQLFORM(db.X).process() return dict(form=form) and I see the database getting updated with new records. One last question, I use db.Table1.X to refer to the last entered record. However, this does not work. How can I make it

[web2py] parenthesis in SQLFORM.grid search

2015-04-29 Thread Richard
Hello, It seems that SQLFORM.grid search tool not accept parenthesis? Ex.: Not possible (table.input_comment = "" or table.input_comment != None) and ... Richard -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - http

Re: [web2py] Two SQLFORMs side by side?

2015-04-29 Thread Richard Vézina
*# In a modules :* class AutocompleteWidgetSelectOrAddOption(object): _class = 'string' def __init__(self, request, field, id_field=None, db=None, orderby=None, limitby=(0, 10),

[web2py] Re: Form to get a value and process

2015-04-29 Thread Anthony
db.Table1.X is just a field object and doesn't refer to any record in the database. To retrieve a record, you must create a query. In most databases, you can just take the record with the largest ID: db(db.Table1).select(orderby=~db.Table1.id, limitby=(0, 1)) That sorts in reverse order based o

[web2py] Re: Form to get a value and process

2015-04-29 Thread Anthony
Another option would be for your form processing action to always store the latest inserted record in the cache -- the scheduler could then just pull the values from the cache. Anthony On Wednesday, April 29, 2015 at 10:17:57 AM UTC-4, Anthony wrote: > > db.Table1.X is just a field object and d

Re: [web2py] parenthesis in SQLFORM.grid search

2015-04-29 Thread Niphlod
is it something that requires an answer ? grid search is meant to be flexible AND user-friendly: you can come up with your own syntax and code your own search widget if you need something else On Wednesday, April 29, 2015 at 3:49:37 PM UTC+2, Richard wrote: > > Hello, > > It seems that SQLFO

Re: [web2py] parenthesis in SQLFORM.grid search

2015-04-29 Thread Richard Vézina
I was looking for know if it was not implemented because it was really more complex or for some other reasons... I found myself needing to pass queries trough url and I need to pass complexe "where clauses" which implies need for () sourrounding some queries groups... For now I have this : from

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-29 Thread Richard Vézina
Turns out that I need a PKI for meet requirement... HMAC with password can help but it not an electronic signature just part of the design depend of the design... :( Richard On Tue, Apr 28, 2015 at 8:58 PM, Derek wrote: > that would do it... but only the user could check the validity. > > > On

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-29 Thread Richard Vézina
Anyone ever use OPENXKPI : https://github.com/openxpki/openxpki ? Richard On Wed, Apr 29, 2015 at 11:16 AM, Richard Vézina < ml.richard.vez...@gmail.com> wrote: > Turns out that I need a PKI for meet requirement... HMAC with password can > help but it not an electronic signature just part of th

Re: [web2py] parenthesis in SQLFORM.grid search

2015-04-29 Thread Richard Vézina
smart_query only usage seems to be processing SQLFORM.grid search queries?? It's used in pyDAL too, but can't figure out yet what it used for. smart_query() is not documented, I can write a little docstring for it, at least specifying it main purpose?? Richard On Wed, Apr 29, 2015 at 10:53 AM,

[web2py] Re: ghost scheduler workers can never be deleted even the web2py-schduler is stopped.

2015-04-29 Thread Pengfei Yu
Thanks Niphlod! It turns out that we have an data base which is shared by two duplicated instances and the other workers are from the other instance. We've fixed that. On Saturday, April 25, 2015 at 8:51:04 AM UTC-4, Niphlod wrote: > > there's nothing that magically insert records on the sch

[web2py] how to run tests over pydal locally?

2015-04-29 Thread Richard
Hello, To run web2py tests we do : python web2py.py --run_system_tests How to run tests over pydal?? Thanks Richard -- 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

[web2py] scheduler workers get deleted constantly and one task is assigned to many different runs

2015-04-29 Thread Pengfei Yu
Hi, I have a scheduler problem after transferring our web2py server in another region. We used EC2 for the server and RDS for the mySql database. It works fine in original region. Right now we move the server and the database to another region with new AWS EC2 and new RDS. I used the web2py-sch

[web2py] Re: scheduler workers get deleted constantly and one task is assigned to many different runs

2015-04-29 Thread Dave S
On Wednesday, April 29, 2015 at 10:17:18 AM UTC-7, Pengfei Yu wrote: [...] > I don't understand why the worker is deleted immediately once it has been > assigned to a run for a task. > > Are the workers being deleted, or are they aborting because of an internal error? If the latter, there m

[web2py] Re: How to capture auth_user.id during registration

2015-04-29 Thread Alex Glaros
works perfect Anthony thanks for the reminder of how that syntax works Alex -- 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 be

[web2py] Re: Form to get a value and process

2015-04-29 Thread Aydin S
Thanks Anthony, This works fine, I also added the field name because I want to get the value not the ID, so I used: db(db.Table1).select(db.Table1.X, orderby=~db.Table1.id, limitby=(0, 1)) However, this does not return the value, I used: def index(): form = SQLFORM(db.Temp).process() X = db(db.Tab

[web2py] Re: Form to get a value and process

2015-04-29 Thread Anthony
Note, this is all covered in the online documentation -- I suggest you skim through the chapter on the DAL: http://web2py.com/books/default/chapter/29/06/the-database-abstraction-layer A select returns a Rows object. You must then extract an individual Row from it, and then the individual field

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Niphlod
right, we should document it inspecting tox.ini should give you a pretty nice headstart :-P however, if you want the "raw" command, it's python -m unittest -v tests same thing as "before" applies: setting a "DB" environmental variable to a backend uri makes the test run using that database

[web2py] Re: ghost scheduler workers can never be deleted even the web2py-schduler is stopped.

2015-04-29 Thread Niphlod
BTW (for future readers): worker names are available as the worker_name, and are by default composed by a hostname#pid format. should be easy to spot where the scheduler is actually running :-P On Wednesday, April 29, 2015 at 6:51:08 PM UTC+2, Pengfei Yu wrote: > > Thanks Niphlod! > > It turns o

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Richard Vézina
richard@sgddms-dev:~/Documents/programmation/web2py_dev/pydal/tests$ python -m unittest -v validation.py Traceback (most recent call last): File "/usr/lib/python2.7/runpy.py", line 162, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python2.7/runpy.py", line 72,

Re: [web2py] anyone had developed something related to electronic signature in web2py app

2015-04-29 Thread Niphlod
again, I'm lost. Either you need to comply with some kind of standard AND the signature you're going to calculate is supposed to be verified by some external service. or as you placed your requirements the need for a PKI is extremely overkill. BTW: maintaining your own PKI (in the "righ

[web2py] Re: scheduler workers get deleted constantly and one task is assigned to many different runs

2015-04-29 Thread Niphlod
whoa. Thank god I put some statistics in to help with debugging.. It seems that the worker processes are handling one task and dieing in the middle of the process. Also, it seems that your task is never-ending. workers that haven't a task to be processed are running fine (empty_runs on

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Niphlod
some time I just don't know what's going on with my writing. Am I really that obscure ? can you spot the difference from mine *python -m unittest -v tests* and yours *python -m unittest -v validation.py* ? To be more precise (and abnoxious, maybe). Place yourself in the root dir of pydal. t

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Richard Vézina
:) I don't test enough!! Richard On Wed, Apr 29, 2015 at 4:08 PM, Niphlod wrote: > some time I just don't know what's going on with my writing. Am I really > that obscure ? > > can you spot the difference from mine > > *python -m unittest -v tests* > > and yours > > *python -m unittest -v vali

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Richard Vézina
One more I don't see my news tests executing... Is there anything else to do then add an new file of unitttest into pydal/tests To add news cases? Richard On Wed, Apr 29, 2015 at 4:13 PM, Richard Vézina wrote: > :) > > I don't test enough!! > > Richard > > On Wed, Apr 29, 2015 at 4:08 PM, Nip

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Richard Vézina
Ok, I had to do add this line to __init__.py from .test_smart_query import * :) Richard On Wed, Apr 29, 2015 at 4:18 PM, Richard Vézina wrote: > One more I don't see my news tests executing... > > Is there anything else to do then add an new file of unitttest into > pydal/tests > > To add new

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Niphlod
oh my. Add to __init__ ^_^' On Wednesday, April 29, 2015 at 10:18:51 PM UTC+2, Richard wrote: > > One more I don't see my news tests executing... > > Is there anything else to do then add an new file of unitttest into > pydal/tests > > To add news cases? > > Richard > > On Wed, Apr 29, 2015 at 4:

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Richard Vézina
that's how validators.py is added!! I don't find how to import smart_query from pydal.helpers.methods import smart_query the above returns "invalid syntax" Richard On Wed, Apr 29, 2015 at 4:28 PM, Niphlod wrote: > oh my. Add to __init__ ^_^' > > On Wednesday, April 29, 2015 at 10:18:51 PM UT

Re: [web2py] how to run tests over pydal locally?

2015-04-29 Thread Richard Vézina
my bad from not form... :( Richard On Wed, Apr 29, 2015 at 4:34 PM, Richard Vézina wrote: > that's how validators.py is added!! > > I don't find how to import smart_query > > from pydal.helpers.methods import smart_query > > the above returns "invalid syntax" > > Richard > > On Wed, Apr 29, 20

[web2py] Re: Form to get a value and process

2015-04-29 Thread Aydin S
Yes, I got it, thanks. There is one problem regarding scheduler though. In my controller I have: def index(): form = SQLFORM(db.Table1).process() P = db().select(db.Table1.X, orderby=~db.Table1.id, limitby=(0, 1)) row = P[0] final = row.X return dict(form=form, final=final) I

[web2py] Re: scheduler workers get deleted constantly and one task is assigned to many different runs

2015-04-29 Thread Pengfei Yu
Hi Niphlod and Dave, I think the worker is deleted because the the last heartbeat doesn't change for a while. When I comment out the line "#dead_workers.delete()" in gluon/schdeuler.py, the task is stuck as QUEUED without new run record created. And the worker supposed to be deleted with the la

[web2py] Re: Form to get a value and process

2015-04-29 Thread Aydin S
I double checked my scheduler and found out a problem and fixed; right now it is working as expected. Thanks for the help and guidance. On Wednesday, 29 April 2015 17:19:44 UTC-4, Aydin S wrote: > > Yes, I got it, thanks. There is one problem regarding scheduler though. > In my controller I have

[web2py] mobile admin - how switch off?

2015-04-29 Thread Dmitry Ermolaev
Now I open admin and see - mobile wersion!!! how it switch off? -- 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 ar

[web2py] Re: mobile admin - how switch off?

2015-04-29 Thread Dmitry Ermolaev
I restore layout.html in admin app! четверг, 30 апреля 2015 г., 9:39:40 UTC+3 пользователь Dmitry Ermolaev написал: > > Now I open admin and see - mobile wersion!!! > > how it switch off? > > now it work on: > http://127.0.0.1:8000/admin/default/site > > ((( > > -- Resources: - http://web2py.co