Fakultas Ilmu Komputer UI

Commit 4e995df1 authored by Nabila Febri Viola's avatar Nabila Febri Viola
Browse files

[REFACTOR] Customize user admin

parent f1562644
......@@ -10,6 +10,12 @@ from .models import User, Profile
class UserAdmin(DjangoUserAdmin):
"""Define admin model for custom User model with no username field."""
readonly_fields = ('email',
fieldsets = (
(None, {'fields': ('email', 'password')}),
(_('Personal info'), {'fields': ('first_name', 'last_name')}),
......@@ -28,6 +34,9 @@ class UserAdmin(DjangoUserAdmin):
search_fields = ('email', 'first_name', 'last_name')
ordering = ('email',)
class Media:
js = [settings.MEDIA_URL+'/js/user_custom_admin.js', ]
class ProfileAdmin(admin.ModelAdmin):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment