Skip to content

Commit

Permalink
Django 1.6 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoistinen committed Jun 9, 2015
1 parent f119206 commit 785f229
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions djangocms_link/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,9 @@

import re

from django.conf import settings
from django.core.validators import URLValidator
from django.utils.deconstruct import deconstructible


@deconstructible
class IntranetURLValidator(URLValidator):
"""
This is essentially the normal, Django URL Validator, but allows for
Expand Down Expand Up @@ -38,7 +35,7 @@ class IntranetURLValidator(URLValidator):
def __init__(self, intranet_host_re=None, **kwargs):
super(IntranetURLValidator, self).__init__(**kwargs)
if intranet_host_re:
self.host_re = ('(' + self.hostname_re + self.domain_re +
self.host_re = ('(' + self.hostname_re + self.domain_re +
self.tld_re + '|' + intranet_host_re + '|localhost)')
self.regex = re.compile(
r'^(?:[a-z0-9\.\-]*)://'
Expand Down

0 comments on commit 785f229

Please sign in to comment.