[web2py] strange problem connecting to the database - help!

2011-05-09 Thread canna
hi everybody I need your help! I have a problem that is tormenting me and driving me to madness, my application suddenly stopped working, and gives me this error (changed names and passwords for security reasons):

[web2py] Re: strange problem connecting to the database - help!

2011-05-09 Thread canna
Thank you all for your help!! turn out the problem was in the psycopg2 module! when I tried: import psycopg2 dir(psycopg2) I got only 4-5 functions, and no 'connect' function! re-installed pstcopg2 and re-launched web2py and it worked like magic! now when I do dir(psycopg2) I get all the

[web2py] Re: unique constraint of multiple columns (at database level)

2010-12-29 Thread canna
Thank you guys for your answers, ron - it was just an example Luther - this table was migrated from our old data and we do intent to use auth instead still, it's good practice to always have unique field or combination of fields in a table besides the id, id is for machines, not suitable for the

[web2py] Re: unique constraint of multiple columns (at database level)

2010-12-29 Thread canna
Thank you guys for your answers, ron - it was just an example Luther - this table was migrated from our old data and we do intent to use auth instead still, it's good practice to always have unique field or combination of fields in a table besides the id, id is for machines, not suitable for the

[web2py] unique constraint of multiple columns (at database level)

2010-12-28 Thread canna
hello everybody! I created a table of contacts that requires the first name+last name to be unique the table: db.define_table(Contacts, Field(FirstName, string, length=45, notnull=True), Field(LastName, string, length=45, notnull=True), Field(Title, string, length=45,

[web2py] global name 'db' is not recognize in a module

2010-05-04 Thread canna
hi all, I want to share a bunch of functions between controllers, so I moved them to a module called 'utilities' in the modules folder, and in the controller I import the module as suggested here in the forum: import applications.myapp.modules.utilities as util reload(util) the problem is, it's

[web2py] Re: global name 'db' is not recognize in a module

2010-05-04 Thread canna
will have the problem not just for db, but also for the other web2py global objects. Massimo On May 4, 4:16 am, canna c.ne...@gmail.com wrote: hi all, I want to share a bunch of functions between controllers, so I moved them to a module called 'utilities' in the modules folder

[web2py] using inline tables in the query (subquery in the FROM field)

2010-04-13 Thread canna
Hello everybody! I really need help with a query I'm trying to execute in Web2Py DAL is there a way to use an inline table in the FROM field of a query? this is my query: SELECT SUM( HoursWorked / DayHoursSum ) AS DaysWorked FROM `Tasks_TimeLog` H, ( SELECT TheDate, User_id, SUM(

[web2py] Re: using inline tables in the query (subquery in the FROM field)

2010-04-13 Thread canna
. On Apr 13, 5:06 am, canna c.ne...@gmail.com wrote: Hello everybody! I really need help with a query I'm trying to execute in Web2Py DAL is there a way to use an inline table in the FROM field of a query? this is my query: SELECT SUM( HoursWorked / DayHoursSum ) AS DaysWorked FROM

[web2py] Re: is there a way to communicate with Web2Py from an external program?

2010-03-23 Thread canna
use XMLRPC described here:http://www.web2py.com/book/default/section/9/2 Perhaps other users have other/better solutions. On Mar 22, 2:02 pm, canna c.ne...@gmail.com wrote: Hello everybody! I making my first steps inWeb2Py, and although I'm not at this stage yet, I will eventually

[web2py] is there a way to communicate with Web2Py from an external program?

2010-03-22 Thread canna
Hello everybody! I making my first steps in Web2Py, and although I'm not at this stage yet, I will eventually have to deal with this issue, and wanted to be prepared as a vfx studio we keep information on every 3D model that is created in 3D program (time spent working on it, it's status etc.)