diff options
| author | Jacob Kaplan-Moss <jacob@jacobian.org> | 2005-09-27 16:34:10 +0000 |
|---|---|---|
| committer | Jacob Kaplan-Moss <jacob@jacobian.org> | 2005-09-27 16:34:10 +0000 |
| commit | cd34c163cc862113da5b27bf9f5ff452f538fb2c (patch) | |
| tree | 8dc8fdbaa3c5b0aa579c68b1a858906f6464da17 /django/core | |
| parent | 8b67f5f829a998c860e107173584dcc4346d1225 (diff) | |
Moved JING from django.core.validators into settings where it belongs. Fixes #568.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core')
| -rw-r--r-- | django/core/validators.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/django/core/validators.py b/django/core/validators.py index 6714bfda3e..697c2efe81 100644 --- a/django/core/validators.py +++ b/django/core/validators.py @@ -23,7 +23,7 @@ ip4_re = re.compile(r'^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$') phone_re = re.compile(r'^[A-PR-Y0-9]{3}-[A-PR-Y0-9]{3}-[A-PR-Y0-9]{4}$', re.IGNORECASE) url_re = re.compile(r'^http://\S+$') -JING = '/usr/bin/jing' +from django.conf.settings import JING_PATH class ValidationError(Exception): def __init__(self, message): @@ -435,9 +435,9 @@ class RelaxNGCompact: fp = open(filename, 'w') fp.write(field_data) fp.close() - if not os.path.exists(JING): - raise Exception, "%s not found!" % JING - p = os.popen('%s -c %s %s' % (JING, self.schema_path, filename)) + if not os.path.exists(JING_PATH): + raise Exception, "%s not found!" % JING_PATH + p = os.popen('%s -c %s %s' % (JING_PATH, self.schema_path, filename)) errors = [line.strip() for line in p.readlines()] p.close() os.unlink(filename) |
