admin.py 515 B

1234567891011121314151617181920
  1. from django.contrib import admin
  2. from import_export import resources
  3. from import_export.admin import ImportExportModelAdmin
  4. from backend.users.models import Profile
  5. # Register your models here.
  6. class ProfileResource(resources.ModelResource):
  7. class Meta:
  8. model = Profile
  9. class ProfileAdmin(ImportExportModelAdmin):
  10. resource_class = ProfileResource
  11. list_display = ('untube_user', 'access_token', 'refresh_token')
  12. list_filter = ('created_at',)
  13. admin.site.register(Profile, ProfileAdmin)