Make use of Token Meta attributes in TokenProxy

This commit is contained in:
Hugo Cartwright 2021-04-05 13:35:29 +02:00
parent dff8ec147e
commit 35aec6c047

View File

@ -48,6 +48,5 @@ class TokenProxy(Token):
return self.user_id
class Meta:
proxy = 'rest_framework.authtoken' in settings.INSTALLED_APPS
abstract = not proxy
proxy = not Token._meta.abstract
verbose_name = "token"