[web2py] Re: Web2Py and custom modules (strange behavior and ValueError)

2014-03-04 Thread Remco K
from gluon.custom_import import track_changes; track_changes(True) statement before importing my modules, but is still need to restart Web2Py for every change in development mode. I don't know what I'm doing wrong here? This is reportedly not working any more, though hasn't been

[web2py] Web2Py and custom modules (strange behavior and ValueError)

2014-03-03 Thread Remco K
Hi everyone, I'm trying to work with modules in Web2Py to define my objects/classes. First i used to use the models folder for this so i don't have to restart my project over and over again. From a first point of view it's working and i can import my objects by adding an import statement to my

[web2py] SQLFORM onvalidation not working

2013-10-27 Thread Remco K
Hi all, I have a SQLFORM with an onvalidation on the form.accepts(), but it's not working. It skips the onvalidation function... Here is what i try (or just like it): def my_form_processing(form): c = form.vars.a * form.vars.b if c 0: form.errors.b = 'a*b cannot be negative'

[web2py] Re: SQLFORM onvalidation not working

2013-10-27 Thread Remco K
Hi Anthony, By setting a breakpoint for the debugger and work with print bla :) -- 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

[web2py] Re: SQLFORM onvalidation not working

2013-10-27 Thread Remco K
I've found that it's probably not a bug in Web2py. Problem is that i use a datetime picker in my view, and the format of it is not valid a datetime format for Web2py to store it in the DB. So Web2y send from the db.py a message '' enter date and time as 1963-08-28 14:30:59. What is used to do

[web2py] Web2py bootstrap modal with jquery datetimepicker not working after AJAX post

2013-07-18 Thread Remco K
Hi all, I have a SQLFORM inserted into a modal (requested as a LOAD file), which includes a datetimepicker from Jquery. This is working well until i submit my form and get a result back from my form validator. After clicking on the datetime field again i don't see the datetimepicker anymore.

[web2py] Re: Web2py bootstrap modal with jquery datetimepicker not working after AJAX post

2013-07-18 Thread Remco K
Hi Massimo, I use the latest sources -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit

[web2py] Dynamic query from string

2013-07-05 Thread Remco K
Hi all, I have a question: I want to create queries dynamically: def dynamicQuery(table, field, value): return db([table][field] == [value]).select() dynamicQuery('tableName', 'fieldName', 'value') Is there someone who can tell me how I can achieve this? Thanks in advance! Remco --

[web2py] Re: Dynamic query from string

2013-07-05 Thread Remco K
Very nice! It's working for me like this: def getValueByID(table, field, id): return db(db[table].id == id).select().first()[field] Thanks Massimo! def dynamicQuery(table, field, value): return db(db[table][field]id == value).select() Op vrijdag 5 juli 2013 12:56:16 UTC+2 schreef Remco

[web2py] Access db in module

2013-07-05 Thread Remco K
Hi all, I have a class in modules from which i can't access the DB object. I have this: in models/db.py: db=DAL(uri, migrate=True) current.db = db And in modules/MyClass.py: from gluon import current class MyClass(object): def __init__(self): self.db = current.db But i still

[web2py] Typo on the new homepage web2py.com

2013-03-13 Thread Remco K
Hi, I noticed a typo on the red button on the homepage: 'Sites powereb by web2py' Regards, Remco -- --- You received this message because you are subscribed to the Google Groups web2py-users group. To unsubscribe from this group and stop receiving emails from it, send an email to

[web2py] Sqlite3 to MySQL IntegrityError

2012-11-23 Thread Remco K
Hi everyone, I've been spending all day to migrate my sqlite3 database to a MySQL database. I've tried multiple options but i always get the following, in the end: IntegrityError: (1452, u'Cannot add or update a child row: a foreign key constraint fails (`charon`.`deviceservices`, CONSTRAINT

[web2py] How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread Remco K
Hello everyone, I'm not a big fan of asking questions rather than find solutions by myself but i need a little help on this one so i hope someone can help me a bit. What i need is 'very simple'. I have a Web2Py application running and i need other applications (PHP or something) to be able to

[web2py] Re: How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread Remco K
Thanks villas! This function isn't for the 'whole wide world' but for an other internal application which needs to connect to my web2py application, so for me this isn't a insecure solution. If you or someone else knows how this can be achieved in 'the' secure way, please let me know! My

[web2py] Re: How to login to Web2Py-app by providing username and password in URL?

2012-09-12 Thread Remco K
['username'],request.vars['password']) yoursite.com/yourapp/default/logmein?username=abcpassword=xyz On Wednesday, September 12, 2012 12:40:13 PM UTC+1, Remco K wrote: Hello everyone, I'm not a big fan of asking questions rather than find solutions by myself but i need a little help

[web2py] Mistake in the web2py book

2012-08-07 Thread Remco K
Hi, I found a little mistake in the Web2Py-book but i dont know if this is the right place to report these things. Anyway: I was reading about using the scheduler when i saw this: completed_runs = db(db.scheduler_run.status='COMPLETED').select() Which gives the error: SyntaxError: keyword

[web2py] Re: IntegrityError: column email is not unique

2012-07-17 Thread Remco K
-5, Remco K wrote: Hi everyone, I got stuck in creating an update form for an auth_user. In the auth_user table i made an extra field: Field('email', length=128, default='', unique=True, notnull=True), Now everytime i try to update the user information (the last name) i get the error

[web2py] IntegrityError: column email is not unique

2012-07-16 Thread Remco K
Hi everyone, I got stuck in creating an update form for an auth_user. In the auth_user table i made an extra field: Field('email', length=128, default='', unique=True, notnull=True), Now everytime i try to update the user information (the last name) i get the error: IntegrityError: column

[web2py] SQLFORM.grid id representation bug?

2012-07-09 Thread Remco K
Hi everyone, I'm working with SQLFORM.grid but I cant get the referenced table representation to work. The only thing i get is the ID of the referenced table(s): *db.py: * db.define_table('clients', Field('number'), Field('name') )

Re: [web2py] Re: SQLFORM.grid id representation bug?

2012-07-09 Thread Remco K
attribute. Anthony On Monday, July 9, 2012 8:35:41 AM UTC-4, Remco K wrote: Hi everyone, I'm working with SQLFORM.grid but I cant get the referenced table representation to work. The only thing i get is the ID of the referenced table(s): *db.py: * db.define_table('clients

Re: [web2py] Re: SQLFORM.grid id representation bug?

2012-07-09 Thread Remco K
, 2012 12:32:11 PM UTC-4, Remco K wrote: Thanks for the answers. This representation works perfectly when i show the content in a dropdown so i think this has more to do with SQLFORM.grid... The dropdown is controlled by the IS_IN_DB validator, not the field's represent attribute. SQLFORM.grid

[web2py] Mistake in the Web2Py book?

2012-07-07 Thread Remco K
Hi, I was reading about crud.archive in the online Web2Py book, when i noticed the following: auth.archive does not timestamp the stored record unless your original table has timestamp fields, for example: db.define_table('mytable', Field('created_on','datetime',

Re: [web2py] Need some help on auth (groups)(users)(member)(permissions)

2012-05-15 Thread Remco K
available app that does something similar. Richard On Mon, May 14, 2012 at 3:11 PM, Remco K wrote: Hello everyone, I need -a little push in the right way- on implementing authorization. Here is what I have and what I want: 'ProjectA' has: * Multiple Users * Multiple Documents

[web2py] Re: Looking for a way to combine auto-complete with adding a non-existing item.

2012-05-14 Thread Remco K
Thank you very much, Anthony! This was exactly what i was looking for. Problem solved. Op vrijdag 11 mei 2012 19:07:32 UTC+2 schreef Anthony het volgende: Are you trying to auto-complete a reference field, and you want to be able to add new records to the referenced table? The built-in

Re: [web2py] Re: Looking for a way to combine auto-complete with adding a non-existing item.

2012-05-14 Thread Remco K
/forum/?fromgroups#!topic/web2py/9KamKgHKUwU Or I will create a web2py slice soon, I hope... Richard On Mon, May 14, 2012 at 12:32 PM, Remco K remc...@gmail.com wrote: Thank you very much, Anthony! This was exactly what i was looking for. Problem solved. Op vrijdag 11 mei 2012 19:07:32

[web2py] Need some help on auth (groups)(users)(member)(permissions)

2012-05-14 Thread Remco K
Hello everyone, I need -a little push in the right way- on implementing authorization. Here is what I have and what I want: 'ProjectA' has: * Multiple Users * Multiple Documents * Multiple Groups A user can have many documents A user can be a member of multiple groups A user can have multiple

[web2py] Looking for a way to combine auto-complete with adding a non-existing item.

2012-05-10 Thread Remco K
Hello everyone, I'm looking for a way to get an auto-complete field combined with adding non-existing item to the DB. I've seen a website which uses this functionality (demo: http://www.tellmehow.nl/video.html ) I have already tried SELECT_OR_ADD_OPTION but i don't like drop-downs... Thanks in