简体   繁体   中英

Why isn't urls.py generated with django-admin startapp mysite?

But instead has to be created by the user.

 project
 |
 +-- settings.py
 +-- mysite
     |
     +-- views.py
     +-- apps.py
     +-- models.py
     +-- * user created urls.py file *

An app doesn't need to have urls, views, or anything at all. It can also just be a collection of templates or be a middleware. Therefore these files have to be created by the user when needed.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM