From 92b6370ed79b0763870e763602c5c72d8281cf73 Mon Sep 17 00:00:00 2001 From: Michael Hall Date: Thu, 1 Mar 2018 17:16:59 -0500 Subject: [PATCH] Small spelling fixes in email, use real name in header bar when logged in, add fields to Account admin --- accounts/admin.py | 10 ++++++++-- get_together/templates/get_together/base.html | 2 +- .../get_together/users/bad_email_confirmation.html | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/accounts/admin.py b/accounts/admin.py index 06887af..3df2525 100644 --- a/accounts/admin.py +++ b/accounts/admin.py @@ -1,11 +1,14 @@ from django.contrib import admin from django.utils.safestring import mark_safe -from .models import Account, Badge, BadgeGrant +from .models import Account, Badge, BadgeGrant, EmailConfirmation # Register your models here. class AccountAdmin(admin.ModelAdmin): - list_display = ('user', 'acctname') + list_display = ('user', 'acctname', 'email', 'is_email_confirmed') + def email(self, obj): + return obj.user.email + email.short_description = 'Email' admin.site.register(Account, AccountAdmin) class BadgeAdmin(admin.ModelAdmin): @@ -19,4 +22,7 @@ class GrantAdmin(admin.ModelAdmin): list_display = ('badge', 'account', 'expires', 'granted_by') admin.site.register(BadgeGrant, GrantAdmin) +class ConfirmationAdmin(admin.ModelAdmin): + list_display = ('email', 'user', 'key', 'expires') +admin.site.register(EmailConfirmation, ConfirmationAdmin) diff --git a/get_together/templates/get_together/base.html b/get_together/templates/get_together/base.html index 5695020..4ce3bbf 100644 --- a/get_together/templates/get_together/base.html +++ b/get_together/templates/get_together/base.html @@ -69,7 +69,7 @@ form { {% if request.user.is_authenticated %}