- Simple profile model for a User, storing a registration date and
- an activation key for the account.
+ Simple profile model for a User, storing an activation key for the
While it is possible to use this model as the value of the
``AUTH_PROFILE_MODULE`` setting, it's not recommended that you do
user = models.ForeignKey(User, unique=True)
activation_key = models.CharField(maxlength=40)
- key_generated = models.DateTimeField()
objects = RegistrationManager()
- self.key_generated = datetime.datetime.now()
- super(RegistrationProfile, self).save()
return "User profile for %s" % self.user.username
expiration_date = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
- return self.
key_generated + expiration_date <= datetime.datetime.now()
+ return self.ed + expiration_date <= datetime.datetime.now()