On Aug 11, 2005, at 10:54 AM, Ludovico Magnocavallo wrote:
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.

Ah, chances are that's because you didn't add the model file to the __all__ in myapp/models/__init__.py

Jacob

Reply via email to