Browse Source

Resolving local URLs only when verify_exists is True.

master
Dawid Lorenz 14 years ago
parent
commit
4c80e8b16d
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      oscar/core/fields.py

+ 2
- 1
oscar/core/fields.py View File

43
         """
43
         """
44
         try:
44
         try:
45
             value = self.fix_local_url(value)
45
             value = self.fix_local_url(value)
46
-            resolve(value)
46
+            if self.verify_exists:
47
+                resolve(value)
47
             self.is_local_url = True
48
             self.is_local_url = True
48
         except Http404:
49
         except Http404:
49
             raise ValidationError('Specified page does not exist')
50
             raise ValidationError('Specified page does not exist')

Loading…
Cancel
Save