Ticket #5819: 5819.diff

File 5819.diff, 775 bytes (added by arien <regexbot@…>, 17 years ago)

trivial patch to ensure url is unique

  • django/contrib/flatpages/models.py

     
    44from django.utils.translation import ugettext_lazy as _
    55
    66class FlatPage(models.Model):
    7     url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True,
     7    url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True, unique=True,
    88        help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes."))
    99    title = models.CharField(_('title'), max_length=200)
    1010    content = models.TextField(_('content'))
Back to Top