Anonymous committed 6ed4763

Removing the key_generated field from RegistrationProfile

Comments (0)

Files changed (2)


 .. _Django:
+The `latest released version`_ of this application is 0.1, and is
+quite stable; it's already been deployed on a number of sites. You can
+also obtain the absolute freshest code from `a Subversion checkout`_,
+but be warned that the code in SVN may not always be
+backwards-compatible, and may well contain bugs that haven't yet been
+.. _latest released version:
+.. _a Subversion checkout:


 class RegistrationProfile(models.Model):
-    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
+    account.
     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()
     class Admin:
-    def save(self):
-        if not
-            self.key_generated =
-        super(RegistrationProfile, self).save()
     def __str__(self):
         return "User profile for %s" % self.user.username
         expiration_date = datetime.timedelta(days=settings.ACCOUNT_ACTIVATION_DAYS)
-        return self.key_generated + expiration_date <=
+        return self.user.date_joined + expiration_date <=