Closed HasanAshab closed 2 months ago
Well, the manager method above ( https://github.com/jazzband/django-rest-knox/blob/09403255a069c2416a5dfb889f80342a2d7b2646/knox/models.py#L16 ) is the way to create a token, you can access prefix and ttl from the settings. They are proxied by methods in the LoginView in order to be easily overridden.
I don’t think anything is missing.
Is there any way to create token outside of LoginView.
There is a method create_token in LoginView
but, it may be more concise to have a function like create_token(user).
Thanks in advance!