Browse Source

add separate field to set hashed email address

master
Fr3deric 6 years ago
parent
commit
529df81239
  1. 10
      bam/admin.py

10
bam/admin.py

@ -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):

Loading…
Cancel
Save