#4429: 500 pages don't work unless you have configured Django database settings
------------------------------+---------------------------------------------
Reporter: Simon Willison | Owner: adrian
Status: new | Component: Core framework
Version: SVN | Resolution:
Keywords: | Stage: Unreviewed
Has_patch: 0 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 0
------------------------------+---------------------------------------------
Comment (by Simon Willison):
I've fixed this locally by making the Dummy connection._rollback() a no-
op, but I'm not sure if this is the best way to handle the problem in the
long term:
{{{
Index: django/db/backends/dummy/base.py
===================================================================
--- django/db/backends/dummy/base.py (revision 5379)
+++ django/db/backends/dummy/base.py (working copy)
@@ -12,6 +12,9 @@
def complain(*args, **kwargs):
raise ImproperlyConfigured, "You haven't set the DATABASE_ENGINE
setting yet."
+def ignore(*args, **kwargs):
+ pass
+
class DatabaseError(Exception):
pass
@@ -21,7 +24,7 @@
class DatabaseWrapper:
cursor = complain
_commit = complain
- _rollback = complain
+ _rollback = ignore
def __init__(self, **kwargs):
pass
}}}
--
Ticket URL: <http://code.djangoproject.com/ticket/4429#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---