django.test.TestCase and settings.DATABASE_SUPPORTS_TRANSACTIONS

2009-03-25 Thread Duc Nguyen
In django.test.TestCase, there is a check for settings.DATABASE_SUPPORTS_TRANSACTIONS but no check to make sure this setting even exists. This causes nosetests to bail out with an AttributeError. What is the correct way to fix this? How do we check that our db type actually supports transactions

Re: docstrings

2007-07-26 Thread Duc Nguyen
Sorry for unintentionally hijacking the thread originally, but Nicola has some great arguments in support of the 80 char limit :) Nicola Larosa wrote > Displaying the source code on a large screen is only one of its many uses: > the keyword here is *interoperability*. > > > You want to print

Re: docstrings

2007-07-25 Thread Duc Nguyen
I favor Adrian's style. On a somewhat related note, is it just me or does no django core developer follow the "no line longer than 79 characters" note. I like using emacs and I have my frame width set at 80 and it bothers me to no end to have to scroll to see every line. Turning on line wrappin

Re: db parameter impemtation

2007-07-11 Thread Duc Nguyen
Carl Karsten wrote: > The reason it sounds strange is because that isn't what I was asking :) > > It is pretty much this simple: > > import settings > import MySQLdb > > con = MySQLdb.connect(user=settings.DATABASE_USER, > passwd=settings.DATABASE_PASSWORD, > db=settings.DATABASE_NAME )