[Fixed]-Does not appear to have any patterns in it. If you see valid patterns in the file then the issue is probably caused by a circular import


Your import is incorrect. The views.py containing login and logout is in the django.contrib.auth app:

from django.contrib.auth.views import login, logout


just check whether urlpattern and change into patterns



It is caused by errors in views.py file as code code redirect link isn’t properly working.
so,Check views file to remove error


In your outermost urls file, if you are including other package urls like

path("accounts/", include("UserDataAPI.urls"))


url(r'^accounts/', include('accounts.urls'))

Ensure that in accounts.urls module or UserDataAPI.urls modules you have declared the urlpatterns variable

Leave a comment