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

AssertionError at /api/v1/auth/register/ #3

Open
Gaerdy opened this issue Mar 7, 2019 · 1 comment
Open

AssertionError at /api/v1/auth/register/ #3

Gaerdy opened this issue Mar 7, 2019 · 1 comment

Comments

@Gaerdy
Copy link

Gaerdy commented Mar 7, 2019

Hi Kasulani,

First of all thanks for your tutorial, it realy helps me understanding some facets of DRF !

I followed all the steps you describe on the readme file to run your application but I can't register.
I get the following error :

AssertionError at /api/v1/auth/register/

'RegisterUsers' should either include a serializer_class attribute, or override the get_serializer_class() method.

Request Method: | GET
Request URL: | http://localhost:8000/api/v1/auth/register/
Django Version: | 2.0.3

@faizanAhmed17
Copy link

Hi Gaerdy,

You have to include serializer_class for the TokenSerializer in the LoginView, put the below snippet on the first line of LoginView
serializer_class = TokenSerializer

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

2 participants