diff options
| author | Simon Willison <simon@simonwillison.net> | 2007-06-01 16:30:38 +0000 |
|---|---|---|
| committer | Simon Willison <simon@simonwillison.net> | 2007-06-01 16:30:38 +0000 |
| commit | 4cda993213fce2b4567ba31f2dc6a116445ce664 (patch) | |
| tree | db5064f151b38d3e6358216e27e722b900579c3a | |
| parent | ea07351799ea71084c1279ad9f5dab1f81362c4b (diff) | |
rollback on dummy database now has no effect (previously raised an error). This means that custom 500 error pages (and e-mailed exceptions) now work even if a database has not been configured. Fixes #4429.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@5410 bcc190cf-cafb-0310-a4f2-bffc1f526a37
| -rw-r--r-- | django/db/backends/dummy/base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/django/db/backends/dummy/base.py b/django/db/backends/dummy/base.py index 6a909016fc..d0ec897407 100644 --- a/django/db/backends/dummy/base.py +++ b/django/db/backends/dummy/base.py @@ -12,6 +12,9 @@ from django.core.exceptions import ImproperlyConfigured 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 IntegrityError(DatabaseError): class DatabaseWrapper: cursor = complain _commit = complain - _rollback = complain + _rollback = ignore def __init__(self, **kwargs): pass |
