On Tue, 2007-11-13 at 21:48 -0800, [EMAIL PROTECTED]
wrote:
> Dear Django Friends,
> I started the tutorial in the Docs folder. So i had a mysite folder
> and inside that i had a polls subfolder. Everything works fine. Then i
> wanted to try the generic codes in a new folder, also a subfolder of
> mysite, called genpolls. I created the views, urls and models python
> files i.e .py files.
>      Then i get a programmer error that the table genpolls_polls
> doesn't exist. After much checking i find that the database tables are
> named polls_poll and polls_choice because of the path to folder
> "polls" when i first created the database. Thus the path from the
> genpolls folder( where the models, urls, and views files reside) gives
> a table name =  "genpolls_polls" which doesn't match any table in the
> database.
> 
>    So how to use the same database for two separate programs or web
> sites.

Since table name are a combination of application name and model name,
by default, normally things will "just work". You appear to have changed
the application name mid-stream, which is why you're seeing something go
a bit awry.

Fortunately, you can have full manual control over the database table
name. See
http://www.djangoproject.com/documentation/model-api/#db-table .

Regards,
Malcolm

-- 
Borrow from a pessimist - they don't expect it back. 
http://www.pointy-stick.com/blog/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to