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).
I added a PR for this: #4
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_deleteparameter on theTokenmodel'suserfield 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