summaryrefslogtreecommitdiff
path: root/main/utils.py
diff options
context:
space:
mode:
authorDusty Phillips <buchuki@gmail.com>2008-09-16 21:12:50 -0400
committerDusty Phillips <buchuki@gmail.com>2008-09-16 21:12:50 -0400
commit4fd05e721e13b62cc02009c797e275f7bb0ea398 (patch)
treee2362e16ea77bedc96023004f5a1c8c0cf4f9390 /main/utils.py
parent851e6d55be41b1053d5fdb7326aa0846638992fc (diff)
drop a bunch of stuff not necessary for django 1.0
Diffstat (limited to 'main/utils.py')
-rw-r--r--main/utils.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/main/utils.py b/main/utils.py
index 0813ac22..eb0cb2a3 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