Skip to content
Snippets Groups Projects
Commit 42e1e8cb authored by ml bonhomme's avatar ml bonhomme :bee: Committed by Erwan Rouchet
Browse files

Add user.created and user.last_login to User details and list in the admin interface

parent 8ed021de
No related branches found
No related tags found
1 merge request!2511Add user.created and user.last_login to User details and list in the admin interface
......@@ -58,13 +58,16 @@ class UserAdmin(BaseUserAdmin):
form = UserChangeForm
add_form = UserCreationForm
readonly_fields = ("created", "last_login",)
# The fields to be used in displaying the User model.
# These override the definitions on the base UserAdmin
# that reference specific fields on auth.User.
list_display = ("email", "display_name", "is_admin", "created")
list_display = ("email", "display_name", "is_admin", "created", "last_login")
list_filter = ("is_admin", )
fieldsets = (
(None, {"fields": ("email", "display_name", "verified_email", "password")}),
(None, {"fields": ("created", "last_login")}),
("Permissions", {"fields": ("is_admin", "is_active", "can_upload_s3_image", "can_create_iiif_image", "can_ingest", "can_create_worker_version", "can_manage_workers")}),
)
# add_fieldsets is not a standard ModelAdmin attribute. UserAdmin
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment