Ticket #14981: models.py.diff
File models.py.diff, 1.9 KB (added by , 14 years ago) |
---|
-
models.py
46 46 A signal receiver which updates the last_login date for 47 47 the user logging in. 48 48 """ 49 user.last_login = datetime.datetime. now()49 user.last_login = datetime.datetime.utcnow() 50 50 user.save() 51 51 user_logged_in.connect(update_last_login) 52 52 … … 116 116 """ 117 117 Creates and saves a User with the given username, e-mail and password. 118 118 """ 119 now = datetime.datetime. now()119 now = datetime.datetime.utcnow() 120 120 121 121 # Normalize the address by lowercasing the domain part of the email 122 122 # address. … … 211 211 is_staff = models.BooleanField(_('staff status'), default=False, help_text=_("Designates whether the user can log into this admin site.")) 212 212 is_active = models.BooleanField(_('active'), default=True, help_text=_("Designates whether this user should be treated as active. Unselect this instead of deleting accounts.")) 213 213 is_superuser = models.BooleanField(_('superuser status'), default=False, help_text=_("Designates that this user has all permissions without explicitly assigning them.")) 214 last_login = models.DateTimeField(_('last login'), default=datetime.datetime. now)215 date_joined = models.DateTimeField(_('date joined'), default=datetime.datetime. now)214 last_login = models.DateTimeField(_('last login'), default=datetime.datetime.utcnow) 215 date_joined = models.DateTimeField(_('date joined'), default=datetime.datetime.utcnow) 216 216 groups = models.ManyToManyField(Group, verbose_name=_('groups'), blank=True, 217 217 help_text=_("In addition to the permissions manually assigned, this user will also get all permissions granted to each group he/she is in.")) 218 218 user_permissions = models.ManyToManyField(Permission, verbose_name=_('user permissions'), blank=True)