X-Git-Url: http://git.ithinksw.org/philo.git/blobdiff_plain/344bace6dc955286a59480e8bf538ab524a7ee9f..54b897cf7eb8b3840b7b53d355d6db6462002b28:/philo/contrib/sobol/models.py?ds=sidebyside diff --git a/philo/contrib/sobol/models.py b/philo/contrib/sobol/models.py index 2cb1651..dbf37ef 100644 --- a/philo/contrib/sobol/models.py +++ b/philo/contrib/sobol/models.py @@ -4,6 +4,7 @@ from django.conf import settings from django.conf.urls.defaults import patterns, url from django.contrib import messages from django.core.exceptions import ValidationError +from django.core.validators import URLValidator from django.db import models from django.http import HttpResponseRedirect, Http404, HttpResponse from django.utils import simplejson as json @@ -15,7 +16,6 @@ from philo.contrib.sobol.utils import HASH_REDIRECT_GET_KEY, URL_REDIRECT_GET_KE from philo.exceptions import ViewCanNotProvideSubpath from philo.models import MultiView, Page from philo.models.fields import SlugMultipleChoiceField -from philo.validators import RedirectValidator eventlet = None if getattr(settings, 'SOBOL_USE_EVENTLET', False): @@ -83,7 +83,7 @@ class Search(models.Model): class ResultURL(models.Model): search = models.ForeignKey(Search, related_name='result_urls') - url = models.TextField(validators=[RedirectValidator()]) + url = models.TextField(validators=[URLValidator()]) def __unicode__(self): return self.url