You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Jason, thank you for this nice library, it's exactly what I'm looking for since I have an API that I want to use token authentication for but I cannot use the Django REST API for it, so this is perfect.
My project is running Django 2.2 and when implementing your library, the missing on_delete parameter on the Token model's user field causes an issue because this is a required parameter since Django 2.0+. The error is: TypeError: __init__() missing 1 required positional argument: 'on_delete'.
To fix this, the line can be changed to: user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name="token", on_delete=models.CASCADE).
Hi Jason, thank you for this nice library, it's exactly what I'm looking for since I have an API that I want to use token authentication for but I cannot use the Django REST API for it, so this is perfect.
My project is running Django 2.2 and when implementing your library, the missing
on_delete
parameter on theToken
model'suser
field causes an issue because this is a required parameter since Django 2.0+. The error is:TypeError: __init__() missing 1 required positional argument: 'on_delete'
.To fix this, the line can be changed to:
user = models.OneToOneField(settings.AUTH_USER_MODEL, related_name="token", on_delete=models.CASCADE)
.I added a PR for this: #4
The text was updated successfully, but these errors were encountered: