JorgeParada
JorgeParada

Reputation: 603

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:

enter image description here

Now I released the following error:

No module named dorna.rest.v1.urls

Upvotes: 0

Views: 204

Answers (2)

ahmed
ahmed

Reputation: 5600

The urls.py seem to be inside dorona folder, try to import rest directly:

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

Upvotes: 1

shad0w_wa1k3r
shad0w_wa1k3r

Reputation: 13372

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.

Upvotes: 1

Related Questions