Added a admin action to cleanup personal data from inactive members.

This commit is contained in:
2018-05-03 09:45:06 +02:00
parent af46768e7d
commit 595341a53b
3 changed files with 64 additions and 18 deletions

View File

@@ -7,8 +7,8 @@ from os import path
from django.conf import settings
from django.contrib.auth.models import AbstractUser
from django.urls import reverse
from django.db import models
from django.urls import reverse
from django.utils import timezone
from django.utils.translation import ugettext as _
from easy_thumbnails.fields import ThumbnailerImageField
@@ -150,7 +150,7 @@ class Membership(AbstractUser):
max_length=1,
choices=GENDER_CHOICES,
blank=True,
null=True
null=True,
)
website = models.URLField(blank=True)
avatar = ThumbnailerImageField(
@@ -206,8 +206,10 @@ class Membership(AbstractUser):
help_text=_('This person has paid the membership fee.')
)
# comment = models.TextField(blank=True)
# objects = MembershipManager()
nullable_personal_data = (
'gender', 'birthday', 'telephone', 'street_name', 'post_code', 'city')
blankable_personal_data = (
'email', 'password', 'first_name', 'last_name', 'website',)
class Meta(object):
"""To manage object ordering and dispalynames on the admin interface."""