Skip to content

Commit

Permalink
Fix Token Admin page
Browse files Browse the repository at this point in the history
  • Loading branch information
szabozoltan69 committed May 28, 2024
1 parent c32dd45 commit 45ccb13
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions api/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from django.conf import settings
from django_admin_listfilter_dropdown.filters import RelatedDropdownFilter
from rest_framework.authtoken.admin import TokenAdmin
from rest_framework.authtoken.models import Token
from rest_framework.authtoken.models import Token, TokenProxy
from reversion_compare.admin import CompareVersionAdmin
# from reversion.models import Revision

Expand Down Expand Up @@ -58,9 +58,8 @@ def get_inline_instances(self, request, obj=None):
class GoTokenAdmin(TokenAdmin):
search_fields = ('user__username', 'user__email',)


# admin.site.unregister(Token)
# admin.site.register(Token, GoTokenAdmin)
admin.site.unregister(TokenProxy)
admin.site.register(TokenProxy, GoTokenAdmin)


class HasRelatedEventFilter(admin.SimpleListFilter):
Expand Down

0 comments on commit 45ccb13

Please sign in to comment.