sebastian-ardila / google-app-engine-django

Automatically exported from code.google.com/p/google-app-engine-django
Apache License 2.0
0 stars 0 forks source link

Need '_rollback' def in class DatabaseWrapper #93

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Define a custom 500.html template in the templates root
2. Set DEBUG = False in settings
3. Raise an 'Http500' in a view
4. Call that view such that the Http500 will be raised

What is the expected output? What do you see instead?
- You would expect to see Django use the custom 500 template that you
  created.
- Instead, I get a python stack trace (not Django) for an AttributeError:
  "<type 'exceptions.AttributeError'>: 'DatabaseWrapper' object has no
attribute '_rollback'"

What version of the product are you using? On what operating system?
- I am using the latest available download (the .zip) of the django helper
  on Windows XP Professional.

Please provide any additional information below.
- I was able to resolve this problem by adding the following code to
  appengine_django\db\base.py

  def _rollback(self):
    pass

  I'm not sure if this is the correct way to fix this problem, but when
  I add that code to the db\base.py file, the 'raise Http500' shows my
  custom 500 template as it should.

Original issue reported on code.google.com by arglad...@gmail.com on 4 Oct 2008 at 8:01

GoogleCodeExporter commented 9 years ago
Would you be able to provide a patch (diff -u format) with your suggested fix 
for
this issue? You will also need to sign the CLA (See README for details).

Original comment by mattbrow...@gmail.com on 27 Jan 2009 at 11:17

GoogleCodeExporter commented 9 years ago
For anyone landing on this page and for my own future reference here is a patch 
file
which I think represents the change suggested in the original report.  This 
patch at
least resolves the problem for me.

I took the location of where _rollback() should go based on this patch
http://code.djangoproject.com/changeset/5949?format=diff&new=5949

patch -p1 or patch -p2 might be needed to trim off the extra path parts, sorry!

Original comment by wtan...@yahoo.com on 17 May 2009 at 4:20

Attachments:

GoogleCodeExporter commented 9 years ago
By the way, this bug also seems to be triggered when you run doctests with 
"manage.py
test"

Original comment by wtan...@yahoo.com on 17 May 2009 at 4:26