django1/django/contrib/admin
Florian Apolloner 325b03ea84 [1.6.x] Final attempt to solve sporadic test failures.
tearDownClass is not called if setUpClass throws an exception, in our case
this means that LiveServerTestCase leaks LiveServerThread sockets if the
test happens to be skipped later on, and AdminSeleniumWebDriverTestCase
doesn't close it's already open browser window. To prevent this leakage
we catch errors where needed and manually call _tearDownClassInternal.
_tearDownClassInternal should be written as defensively as possible since
it is not allowed to make any assumptions on how far setUpClass got.

This patch should fix the sporadic "Address already in use"-errors on jenkins
and also the "This code isn't under transaction management"-error for sqlite
(also just on jenkins).

After discussion with koniiiik, jezdez, kmtracey, tos9, lifeless, nedbat and
voidspace it was decided that this is the safest approach (thanks to everyone
for their comments and help). Manually calling tearDownClass was shut down
cause we don't know how our users override our classes.

This is a private and very specialized API on purpose and should not be used
without a strong reason!

This patch partially reverts the earlier attempts to fix those issues,
namely:
	2fa0dd73b1 and
	3c5775d36f

Final note: If this patch breaks in a later version of Django, please be
very careful on how you fix it, you might not see test failures locally.
That said, this patch hopefully doesn't produce even more failures.

Backport of 73a610d2a8 from master.
2013-09-17 18:36:32 +02:00
..
bin Fixed #19333 -- Moved compress.py outside of the admin static folder. Thanks to camilonova, Russell Keith-Magee, Aymeric Augustin and Ramiro Morales for the feedback. 2013-02-02 15:01:32 -08:00
locale Updated translation catalogs 2013-05-25 14:32:44 +02:00
static/admin [1.6.x] Fixed overflow for the "Recent Actions" widget on the admin index. 2013-08-13 13:26:37 -04:00
templates [1.6.x] Fixed #13696 -- ensured inline pk field is rendered 2013-07-21 13:13:20 -04:00
templatetags [1.6.x] Fixed #20767 -- Fixed ModelAdmin.preserve_filters for namespaced URLs. 2013-07-18 18:23:21 -04:00
views Fixed #20288 -- Fixed inconsistency in the naming of the popup GET parameter. 2013-06-19 22:16:16 +02:00
__init__.py Fixed #5833 -- Modified the admin list filters to be easier to customize. Many thanks to Honza Král, Tom X. Tobin, gerdemb, eandre, sciyoshi, bendavis78 and Julien Phalip for working on this. 2011-05-03 10:44:23 +00:00
actions.py Itty bitty typo fix. 2013-06-19 17:45:28 -06:00
exceptions.py Fixed #19866 -- Added security logger and return 400 for SuspiciousOperation. 2013-05-25 16:27:34 -07:00
filters.py Replaced `and...or...` constructs with PEP 308 conditional expressions. 2013-05-26 23:47:50 -03:00
forms.py Fixed #20199 -- Allow ModelForm fields to override error_messages from model fields 2013-06-18 08:01:17 -04:00
helpers.py [1.6.x] Fixed #20805 -- Removed an extra colon beside checkboxes in the admin. 2013-07-26 14:47:58 -04:00
models.py [1.6.x] Fixed LogEntry.get_admin_url() for non-existent models. 2013-08-02 12:51:46 -04:00
options.py [1.6.x] Fixed backport error in previous commit; refs #15961 2013-08-04 07:30:30 -04:00
sites.py Fixed #12674 -- provide a way to override admin validation 2013-05-19 12:42:52 +02:00
tests.py [1.6.x] Final attempt to solve sporadic test failures. 2013-09-17 18:36:32 +02:00
util.py [1.6.x] Fixed #16433 -- Fixed a help_text/read only field interaction that caused an admin crash. 2013-08-29 09:45:02 -04:00
validation.py Removed several unused imports. 2013-06-19 17:18:40 +02:00
widgets.py Apply autoescaping to AdminURLFieldWidget. 2013-08-13 11:06:00 -05:00