开发者

Defining models in a top level Django directory

开发者 https://www.devze.com 2022-12-13 02:27 出处:网络
I\'ve noticed that in order for me to define models, I need to do something like: python manage.py startapp app_name

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? So开发者_如何学运维metimes 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消