Django Library Users
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

admin.py 341B

12345678910111213
  1. from django.contrib import admin
  2. from .models import UserProfile
  3. class UserProfileAdmin(admin.ModelAdmin):
  4. list_display = ('user', )
  5. search_fields = ('user', 'language_code', 'timezone', 'id', )
  6. list_filter = (
  7. ('language_code', admin.ChoicesFieldListFilter),
  8. )
  9. admin.site.register(UserProfile, UserProfileAdmin)