Jacob Kaplan-Moss wrote:
I'd suggest you walk yourself through the tutorials, because those will
explain the answer to your question (and more). The short answer is
that if your app is in INSTALLED_APPS, you'll access it by doing "from
django.models.boxes import boxes" or somesuch.
Jacob, I *did* have a look at the tutorials and the django site in svn,
but all the examples I found had one model file per app.
>>> That's by design (but you can change it if you like). If you've got
>>> "mysite.apps.myapp" in INSTALLED_APPS, and the files "boxes.py" with
>>> a Box model, you'll indeed get a model called "boxes.boxes" The
What's more, if I add a boxes.py file to myapp/models (where a myapp.py
file already exists) I can see 'Boxes' in the admin console, but when I
try to add a new one I get
ProgrammingError: (1146, "Table 'myapp.boxes_boxes' doesn't exist")
even though I recreated the db after adding the new model file.
Ludo