问题描述:

I've noticed that in order for me to define models, I need to do something like:

python manage.py startapp app_name

Is there anyway to avoid this convention and be able to create a models.py directly in the top level site that django-admin.py has created for me? Sometimes I'm building a site that can be put together in literally 15 minutes thanks to Django. I don't see the need for complexity of having an additional app built and a modified settings.py just for a form model or something similar.

网友答案:

Not really. The django admin programs expect app/models.py file names.

相关阅读:
Top