Reputation: 80
I am not able to import the views.py module in urls.py module. I have tried multiple ways,
from . import views
import views
from rango import views
But none of them works , it just raises import error
.
urls.py file
error :-
I am able to import models.py module in urls.py but not able to import views.py in urls.py even though models.py and views.py are in the same location.
Seems magical !!
Upvotes: 0
Views: 2164
Reputation: 123
I usually import explicitly, for example:
from rango.views import add_category
But you can try
from rango import views
Upvotes: 1