[web2py] Re: why won't web2py create the databases

2012-01-13 Thread pbreit
What you are doing is pretty straightforward so I'm surprised you are running in to trouble. I did notice this line is not quite right: jodb.joke_category.requires = IS_IN_DB(jodb,jodb.joke.id) Should be: jodb.joke_category.joke_id.requires = IS_IN_DB(jodb, joke.id ) For

[web2py] Re: why won't web2py create the databases

2012-01-12 Thread villas
I used to have a few problems like you describe, but then I decided to make use of Sqlite. It is so easy to set it up and then tear down - and throw it away! So, now when I first start to write an app, I use Sqlite initially. After defining my tables, I spend some extra time adding some te

[web2py] Re: why won't web2py create the databases

2012-01-12 Thread Anthony
On Wednesday, January 11, 2012 11:44:48 PM UTC-5, Likit wrote: > > I guess I like SQL better than frameworks. SQL is a query language for > DDL and DML that is well documented and completely explicitly. > Frameworks are opaque and invent a new syntax subject to ambiguities > of parens, square br

[web2py] Re: why won't web2py create the databases

2012-01-12 Thread Likit
Thanks for the replies. I deleted the tables themselves--not in app/databases but from the mysql dir where they are kept. I then use phpmyadmin to create an empty d-b, as required when using mysql. (Yes, I read the db chapter on the web2py book.) I don't believe you are seeing a period in the db

[web2py] Re: why won't web2py create the databases

2012-01-12 Thread Jay
@Likit, > ProgrammingError: (1146, u"Table 'jodb.joke_category' doesn't exist") It looks as though you have '.' (period) in the table name and that is probably causing the problem. If that is not the case, could you show us your db.py file? We could really help then. On Jan 12, 12:03 am, Likit

[web2py] Re: why won't web2py create the databases

2012-01-12 Thread Vineet
@Likit, I don't think there is any reason to abandon web2py. Maybe, you are on the right track learning web2py, but got sideways sometimes (as you mentioned about the issue of 'tables not created by DAL'). Like many others, I have found the online web2py book very neatly documented. My advise to yo

Re: [web2py] Re: why won't web2py create the databases

2012-01-12 Thread Marin Pranjić
DAL reads information from app/databases. If you delete it's contents, but do not delete tables in database, you will get error "table already exists". You can use migrate=False,false_migrate=True to fix this. If you delete tables in database, but do not delete contents of app/databases, you will

[web2py] Re: why won't web2py create the databases

2012-01-11 Thread Likit
I mean, why won't web2py create the tables through its famous DAL. I have created the database directly in mysql. On Jan 11, 8:44 pm, Likit wrote: > I guess I like SQL better than frameworks. SQL is a query language for > DDL and DML that is well documented and completely explicitly. > Framework