简体   繁体   中英

Django with urls.py importing app

My project was running; When cleaning .pyc, he stopped recognizing routes apps I created within it. The directory structure is as follows and In the main urls.py, I have the following:

在此处输入图片说明

Now I released the following error:

No module named dorna.rest.v1.urls

It seems you have added dorna twice. You probably don't have to do that as can be seen from your '^admin/' route.

Thus, include('dorna.rest.v1.urls') instead of include('dorna.dorna.rest.v1.urls') should work.

urls.py似乎在dorona文件夹中,请尝试直接导入rest:

(r'^v1/', include('rest.v1.urls')),

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