# browsershots.org - Test your web design in different browsers # Copyright (C) 2007 Johann C. Rocholl # # Browsershots is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # Browsershots is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . """ Nonce models. """ __revision__ = "$Rev$" __date__ = "$Date$" __author__ = "$Author$" from django.db import models from django.utils.translation import ugettext_lazy as _ from shotserver04.factories.models import Factory class Nonce(models.Model): """ Authentication nonce for password encryption. """ hashkey = models.SlugField( _('hashkey'), max_length=32, unique=True) ip = models.IPAddressField( _('IP address')) factory = models.ForeignKey(Factory, verbose_name=_('factory'), null=True, blank=True) email = models.EmailField( verbose_name=_('email'), null=True, blank=True) created = models.DateTimeField( _('created'), auto_now_add=True) def __unicode__(self): return self.hashkey class Meta: verbose_name = _('nonce') verbose_name_plural = _('nonces') ordering = ('created', 'hashkey')