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 controllers.

However;

I do get some strange behaviors:

First of all; I added the:

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?

Second; after i submit a SQLFORM with data and store the data in the DB i 
normally do an automatic redirect to the index-page to show the inserted 
data. The problem that i have is that Web2Py crashes on a ValueError:

<type 'exceptions.ValueError'> SELECT [...]

When i execute the SQL-statement in my MySQL-client i do get the results 
that Web2Py should give me, so i don't know what is going wrong... Now i 
have to stop Web2Py, start it again and refresh the page in order to see my 
new data.

I also get this ValueError on inserting data into the DB from a Modal 
posted via AJAX. When i turn on the debugger and watch the process step by 
step it just breaks on a very normal insert statement.

The Exception gives me the following output:

Error on inserting Overtime!: INSERT INTO overtime(startDate,employee_id,
endDate,description) VALUES ('2014-03-02 00:00:00',114,'2014-03-21 00:00:00'
,'dfgfdfdgfdgfdg');

I can put this SQL-statement manually to the MySQL-client and insert the 
data without any problems.

I'm wondering if I'm doing something wrong with using modules for my 
objects. Maybe i forgot something?

I hope someone can help me out on this! I'm using the latest stable: 
2.9.3-stable+timestamp.2014.03.03.16.38.00 
( <http://www.web2py.com/init/default/download>LGPLv3 
License<http://www.gnu.org/licenses/lgpl.html>
)

Thanks in advance!
Remco


-- 
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 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 https://groups.google.com/groups/opt_out.

Reply via email to