-
Notifications
You must be signed in to change notification settings - Fork 245
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
login- logout @urls.py #13
Comments
solved the issue |
Should I make a pull request? |
Good catch! I solved the issue on my last commit! Thanks @yusufhilmi ! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Firstly I am kinda new for django so it might be an easy issue,
I was taking an error at ./chat/urls.py
path('login/', auth_views.login, name='login'), path('logout/', auth_views.logout, {'next_page': '/'}, name='logout', )
I have fixed this with replacing it with
path('login/', auth_views.LoginView, name='login'), path('logout/', auth_views.LogoutView, {'next_page': '/'}, name='logout', )
but an error rises when I try to login with url http://127.0.0.1:8000/ which redirects to http://127.0.0.1:8000/login/?next=/
I have this error in Debug
`
Django Version: 2.2.8
Python Version: 3.6.5
Installed Applications:
['django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'core',
'rest_framework',
'channels']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.middleware.common.CommonMiddleware',
'django.middleware.csrf.CsrfViewMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.contrib.messages.middleware.MessageMiddleware',
'django.middleware.clickjacking.XFrameOptionsMiddleware']
Traceback:
File "C:\Users\ASUS.virtualenvs\django-channels-chat-master-uWlQjTPL\lib\site-packages\django\core\handlers\exception.py" in inner
34. response = get_response(request)
File "C:\Users\ASUS.virtualenvs\django-channels-chat-master-uWlQjTPL\lib\site-packages\django\core\handlers\base.py" in _get_response
115. response = self.process_exception_by_middleware(e, request)
File "C:\Users\ASUS.virtualenvs\django-channels-chat-master-uWlQjTPL\lib\site-packages\django\core\handlers\base.py" in _get_response
113. response = wrapped_callback(request, *callback_args, **callback_kwargs)
Exception Type: TypeError at /login/
Exception Value: init() takes 1 positional argument but 2 were given
`
I know that the AUTH is still in TO-DO list but if I can understand this I think I might help to develop this project further
The text was updated successfully, but these errors were encountered: