Ticket #5192: 0001-add-support-for-dots-and-tildes-in-flatpages.patch

File 0001-add-support-for-dots-and-tildes-in-flatpages.patch, 1.2 KB (added by ctrochalakis, 15 years ago)

+dots+tildes, new patch on top of trunk

  • django/contrib/flatpages/admin.py

    From 9510383606be8a7e5f239b7b7a4d094678a98770 Mon Sep 17 00:00:00 2001
    From: Christos Trochalakis <yatiohi@ideopolis.gr>
    Date: Mon, 10 Aug 2009 15:53:52 +0300
    Subject: [PATCH] add support for dots and tildes in flatpages
    
    ---
     django/contrib/flatpages/admin.py |    4 ++--
     1 files changed, 2 insertions(+), 2 deletions(-)
    
    diff --git a/django/contrib/flatpages/admin.py b/django/contrib/flatpages/admin.py
    index b6fdba3..1b377e9 100644
    a b from django.utils.translation import ugettext_lazy as _  
    55
    66
    77class FlatpageForm(forms.ModelForm):
    8     url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/]+$',
     8    url = forms.RegexField(label=_("URL"), max_length=100, regex=r'^[-\w/\.~]+$',
    99        help_text = _("Example: '/about/contact/'. Make sure to have leading"
    1010                      " and trailing slashes."),
    1111        error_message = _("This value must contain only letters, numbers,"
    12                           " underscores, dashes or slashes."))
     12                          " dots, underscores, dashes, slashes or tildes."))
    1313
    1414    class Meta:
    1515        model = FlatPage
Back to Top