User Registration now uses all possibilities of the Membership Model. So you could apply for a membership with one step.

Fixed an error in the cleanup-registration command.
Also more stuff has been translated
This commit is contained in:
2016-09-16 18:57:28 +02:00
committed by Christian Berg
parent 5bbf3022fd
commit 4d1646e7d0
8 changed files with 393 additions and 173 deletions

View File

@@ -71,9 +71,11 @@ class ActivationManager(models.Manager):
return self.create(user=user, activation_key=activation_key)
def expired(self):
timespan = timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
expiration_date = timezone.now() - timespan
return self.filter(
user__is_active=False,
user__date_joined__lt=self.expiration_date
user__date_joined__lt=expiration_date
)
@@ -144,7 +146,9 @@ class Membership(AbstractUser):
gender = models.CharField(
_("Gender"),
max_length=1,
choices=GENDER_CHOICES
choices=GENDER_CHOICES,
blank=True,
null=True
)
# first_name = models.CharField(_("Given Name"), max_length=30)
# last_name = models.CharField(_("Last Name"), max_length=30)