Django

Code

Ticket #5192: 5192b.diff

File 5192b.diff, 0.6 kB (added by simeon, 7 months ago)

Alter django/contrib/flatpages/models.py

  • django/contrib/flatpages/models.py

    old new  
    33from django.contrib.sites.models import Site 
    44from django.utils.translation import ugettext_lazy as _ 
    55 
     6import re 
     7validators.alnumurl_re = re.compile(r'^[-\w/~]+$') 
     8 
    69class FlatPage(models.Model): 
    710    url = models.CharField(_('URL'), max_length=100, validator_list=[validators.isAlphaNumericURL], db_index=True, 
    811        help_text=_("Example: '/about/contact/'. Make sure to have leading and trailing slashes."))