From 4fd05e721e13b62cc02009c797e275f7bb0ea398 Mon Sep 17 00:00:00 2001 From: Dusty Phillips Date: Tue, 16 Sep 2008 21:12:50 -0400 Subject: drop a bunch of stuff not necessary for django 1.0 --- main/utils.py | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'main/utils.py') diff --git a/main/utils.py b/main/utils.py index 0813ac2..eb0cb2a 100644 --- a/main/utils.py +++ b/main/utils.py @@ -1,25 +1,8 @@ -from django.core import validators from django.conf import settings from django.core.cache import cache from django.shortcuts import render_to_response from django.template import RequestContext -def validate(errdict, fieldname, fieldval, validator, blankallowed, request): - """ - A helper function that allows easy access to Django's validators without - going through a Manipulator object. Will return a dict of all triggered - errors. - """ - if blankallowed and not fieldval: - return - alldata = ' '.join(request.POST.values()) + ' '.join(request.GET.values()) - try: - validator(fieldval, alldata) - except validators.ValidationError, e: - if not errdict.has_key(fieldname): - errdict[fieldname] = [] - errdict[fieldname].append(e) - def prune_cache(django_page_url): if not settings.CACHE: return -- cgit v1.2.3-24-g4f1b