Ticket #2276: validators.py.diff

File validators.py.diff, 603 bytes (added by nkeric, 18 years ago)

patch the validator isSlug

  • django/core/validators.py

     
    2727integer_re = re.compile(r'^-?\d+$')
    2828ip4_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}$')
    2929phone_re = re.compile(r'^[A-PR-Y0-9]{3}-[A-PR-Y0-9]{3}-[A-PR-Y0-9]{4}$', re.IGNORECASE)
    30 slug_re = re.compile(r'^[-\w]+$')
     30slug_re = re.compile(r'^[-\w]+$', re.UNICODE)
    3131url_re = re.compile(r'^https?://\S+$')
    3232
    3333lazy_inter = lazy(lambda a,b: str(a) % b, str)
Back to Top