Ticket #5368: allow_dot.patch

File allow_dot.patch, 1.1 KB (added by amitu, 7 years ago)
  • django/core/validators.py

     
    3434integer_re = re.compile(r'^-?\d+$')
    3535ip4_re = re.compile(r'^(25[0-5]|2[0-4]\d|[0-1]?\d?\d)(\.(25[0-5]|2[0-4]\d|[0-1]?\d?\d)){3}$')
    3636phone_re = re.compile(r'^[A-PR-Y0-9]{3}-[A-PR-Y0-9]{3}-[A-PR-Y0-9]{4}$', re.IGNORECASE)
    37 slug_re = re.compile(r'^[-\w]+$')
     37slug_re = re.compile(r'^[-\w\.]+$')
    3838url_re = re.compile(r'^https?://\S+$')
    3939
    4040lazy_inter = lazy(lambda a,b: force_unicode(a) % b, unicode)
  • docs/model-api.txt

     
    401401~~~~~~~~~~~~~
    402402
    403403"Slug" is a newspaper term. A slug is a short label for something,
    404 containing only letters, numbers, underscores or hyphens. They're generally
     404containing only letters, numbers, underscores, dots, or hyphens. They're generally
    405405used in URLs.
    406406
    407407Like a CharField, you can specify ``max_length``. If ``max_length`` is
Back to Top