account gender and birth date field update fix and add
This commit is contained in:
@@ -19,18 +19,18 @@ class UserAddressInLine(TabularInline):
|
||||
|
||||
@admin.register(User)
|
||||
class UserAdmin(BaseUserAdmin, ModelAdmin, ImportExportModelAdmin):
|
||||
# form = UserChangeForm
|
||||
# add_form = UserCreationForm
|
||||
form = UserChangeForm
|
||||
add_form = UserCreationForm
|
||||
change_password_form = AdminPasswordChangeForm
|
||||
filter_horizontal = []
|
||||
ordering = []
|
||||
inlines = [UserAddressInLine]
|
||||
list_filter = ['is_superuser']
|
||||
search_fields = ['phone', 'first_name', 'last_name', 'email']
|
||||
list_display = ['full_name_display', 'phone', 'email', 'is_superuser', ]
|
||||
list_display = ['full_name_display', 'phone', 'email', 'is_superuser', 'gender', 'birth_date']
|
||||
# readonly_fields = ['phone', 'email', 'otp_expiry', 'otp_hash', 'date_joined', 'profile_photo']
|
||||
|
||||
exclude = ('otp_hash', 'otp_expiry', 'is_active', 'is_staff', 'password', 'last_login', 'gender', 'birth_date')
|
||||
exclude = ('otp_hash', 'otp_expiry', 'is_active', 'is_staff', 'password', 'last_login',)
|
||||
import_form_class = ImportForm
|
||||
export_form_class = ExportForm
|
||||
fieldsets = (
|
||||
|
||||
Reference in New Issue
Block a user