account gender and birth date field update fix and add

This commit is contained in:
Parsa Nazer
2025-02-11 22:14:28 +03:30
parent a206ad7079
commit 4234418e51
3 changed files with 24 additions and 6 deletions
+4 -4
View File
@@ -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 = (