开发者

Defining models in a top level Django directory

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜