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 @@
from django.contrib import admin from django.contrib import admin
from django.contrib.auth.admin import UserAdmin as BaseUserAdmin from django.contrib.auth.admin import UserAdmin as BaseUserAdmin
from django.contrib.auth.models import User from django.contrib.auth.models import User
from django import forms
from .models import Account 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): class AccountInline(admin.StackedInline):
model = Account model = Account
can_delete = False can_delete = False
form = AccountInlineForm
class UserAdmin(BaseUserAdmin): class UserAdmin(BaseUserAdmin):

Loading…
Cancel
Save