amitu / importd

django based mini framework inspired from sinatra. fully compatible with django.
http://amitu.com/importd/
BSD 3-Clause "New" or "Revised" License
510 stars 30 forks source link

Support for django.db.models.Model and syncdb? #2

Closed saevarom closed 11 years ago

saevarom commented 11 years ago

I've tried simply adding django.db.models.Model to importd.D, similar to other django builtins, but when I try to run syncdb I get an error:

ImportError: Settings cannot be imported, because environment variable DJANGO_SETTINGS_MODULE is undefined.
saevarom commented 11 years ago

Ok I see now that I can do this by seperating the model code into an app.

amitu commented 11 years ago

Hey, I am not sure I understood what you were trying to do, but yes, for creating models you must create an app. Which may seem to defeat the point of a single file framework, but the only way i know how to include models in same file is too "magical" for even my taste :-p