list filter and search fields
This commit is contained in:
@@ -25,8 +25,8 @@ class UserAdmin(BaseUserAdmin, ModelAdmin, ImportExportModelAdmin):
|
||||
filter_horizontal = []
|
||||
ordering = []
|
||||
inlines = [UserAddressInLine]
|
||||
list_filter = []
|
||||
search_fields = ['phone', 'first_name', 'last_name', 'full_name', 'email']
|
||||
list_filter = ['is_superuser']
|
||||
search_fields = ['phone', 'first_name', 'last_name', 'email']
|
||||
list_display = ['full_name_display', 'phone', 'email', 'is_superuser', ]
|
||||
readonly_fields = []
|
||||
|
||||
@@ -63,7 +63,6 @@ class UserAdmin(BaseUserAdmin, ModelAdmin, ImportExportModelAdmin):
|
||||
admin.site.unregister(Group)
|
||||
from django.contrib import admin
|
||||
from rest_framework_simplejwt.token_blacklist.models import BlacklistedToken, OutstandingToken
|
||||
# Unregister the BlacklistedToken and OutstandingToken models
|
||||
admin.site.unregister(BlacklistedToken)
|
||||
admin.site.unregister(OutstandingToken)
|
||||
|
||||
@@ -72,11 +71,10 @@ admin.site.unregister(OutstandingToken)
|
||||
class AddressAdmin(ModelAdmin, ImportExportModelAdmin):
|
||||
import_form_class = ImportForm
|
||||
export_form_class = ExportForm
|
||||
search_fields = ['address', 'name', 'city', 'province']
|
||||
list_display = ['user', 'name', 'address_display', 'postal_code', 'city', 'province', 'for_me']
|
||||
|
||||
compressed_fields = True
|
||||
warn_unsaved_form = True
|
||||
|
||||
formfield_overrides = {
|
||||
models.TextField: {
|
||||
"widget": WysiwygWidget,
|
||||
|
||||
Reference in New Issue
Block a user