Skip to content
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

Fix TypeError when logging in with the latest release #261

Open
johnbradley opened this issue Nov 3, 2021 · 1 comment
Open

Fix TypeError when logging in with the latest release #261

johnbradley opened this issue Nov 3, 2021 · 1 comment

Comments

@johnbradley
Copy link
Contributor

The latest release the following error is thrown:

Bad Request: /auth/api-token-refresh/
WARNING:django.request:Bad Request: /auth/api-token-refresh/
Internal Server Error: /accounts/login/
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
TypeError: __init__() takes 1 positional argument but 2 were given
ERROR:django.request:Internal Server Error: /accounts/login/
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner
    response = get_response(request)
  File "/usr/local/lib/python3.6/site-packages/django/core/handlers/base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
TypeError: __init__() takes 1 positional argument but 2 were given

This error is likely due to upgrading Django.

@johnbradley
Copy link
Contributor Author

Looks like there is a new way to setup the LoginViews:

path('accounts/login/', auth_views.LoginView.as_view(template_name='myapp/login.html')),

https://docs.djangoproject.com/en/3.2/topics/auth/default/#all-authentication-views

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant