Reputation: 1796
I am creating a Django based app and I'd like to put everything under the root in the following structure:
/path/to/my/app/
settings.py
models.py
urls.py
admin.py
...
One problem that I run into is the admin interface doesn't include whatever models I have that are registerd in admin.py usin
admin.site.register(models.MyModel)
Usually that's done by using auto discover in urls.py, but now I have no registered "app", the auto discover doesn't work anymore. Is there anyway I can still use the admin interface?
Thanks.
Upvotes: 0
Views: 126
Reputation: 1485
Putting the app in the django-style directory structure will make your project easily extensible if you decide to add functionality later.
Upvotes: 1
Reputation: 599798
Django simply doesn't work without apps. They're the fundamental building block of a Django site. A whole range of things, not just the admin, will fail to work. Why do you want to do this?
Upvotes: 2