|
|
|
@ -1,12 +1,22 @@
@@ -1,12 +1,22 @@
|
|
|
|
|
from django.contrib import admin |
|
|
|
|
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin |
|
|
|
|
from django.contrib.auth.models import User |
|
|
|
|
from django import forms |
|
|
|
|
from .models import Account |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AccountInlineForm(forms.ModelForm): |
|
|
|
|
hased_email_set = forms.EmailField(label='Set hashed email address') |
|
|
|
|
|
|
|
|
|
class Meta: |
|
|
|
|
model = Account |
|
|
|
|
fields = ['hashed_email'] |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class AccountInline(admin.StackedInline): |
|
|
|
|
model = Account |
|
|
|
|
can_delete = False |
|
|
|
|
form = AccountInlineForm |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class UserAdmin(BaseUserAdmin): |
|
|
|
|