4👍
✅
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
2👍
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
- Celery + Django: Cannot start celerybeat on Windows 7
- What are the pros and cons of using GenericForeignKey vs multitable inheritance vs OneToOneField?
- Django: invalid keyword argument for this function
- Make the user in a model default to the current user
- Django: Add user to group via Django Admin
0👍
In your outermost urls file, if you are including other package urls like
path("accounts/", include("UserDataAPI.urls"))
or
url(r'^accounts/', include('accounts.urls'))
Ensure that in accounts.urls
module or UserDataAPI.urls
modules you have declared the urlpatterns
variable
- From django.db import models, migrations ImportError: cannot import name migrations
- Django 2.0 url parameters in get_queryset
- Django template rows of multiple items
Source:stackexchange.com