summaryrefslogtreecommitdiff
path: root/django/core/exceptions.py
diff options
context:
space:
mode:
authorMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2010-09-12 18:45:26 +0000
committerMalcolm Tredinnick <malcolm.tredinnick@gmail.com>2010-09-12 18:45:26 +0000
commitfc26da645aea2361d78cf5a5543214a240d82527 (patch)
tree0809482a6ff1e3e1f6f55e376dfca19ad336fdce /django/core/exceptions.py
parentbfbc259de0813cd2d1c29755994de3bbf77551fe (diff)
downloaddjango-fc26da645aea2361d78cf5a5543214a240d82527.tar.gz
Add warning when using cache keys that might not work with memcached.
This means testing with local dev caches (not memcache) will warn developers if they are introducing inadvertent importabilities. There is also the ability to silence the warning if a dev is not planning to use memcache and knows what they are doing with their keys. Thanks to Carl Meyer for the patch. Fixed #6447. git-svn-id: http://code.djangoproject.com/svn/django/trunk@13766 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/core/exceptions.py')
-rw-r--r--django/core/exceptions.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/django/core/exceptions.py b/django/core/exceptions.py
index ee6d5fe37b..21be8702fa 100644
--- a/django/core/exceptions.py
+++ b/django/core/exceptions.py
@@ -1,4 +1,9 @@
-"Global Django exceptions"
+"""
+Global Django exception and warning classes.
+"""
+
+class DjangoRuntimeWarning(RuntimeWarning):
+ pass
class ObjectDoesNotExist(Exception):
"The requested object does not exist"