Commit Graph

2611 Commits

Author SHA1 Message Date
Ramiro Morales 4ab5a43785 Fixed #14049 -- Made our TestCase subclasses not load database fixtures (nor set up custom URLconfs) for test methods that are going to be skipped. Thanks zimnyx for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16369 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11 15:27:12 +00:00
Jannis Leidel 703498b1c8 Fixed #16179 -- Extended argument handling of the new WizardView a little to behave the same as the rest of the generic class based views. Also cleaned up the template loading in its tests a bit. Thanks, Harro van der Klauw.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16368 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11 15:11:56 +00:00
Jannis Leidel ce3c281090 Fixed #811 -- Added support for IPv6 to forms and model fields. Many thanks to Erik Romijn.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-11 13:48:24 +00:00
Ramiro Morales c43d15b3b3 More removal of poorly legible constructs to workaround Python 2.4 shortcomings.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 18:43:29 +00:00
Russell Keith-Magee 4189561820 Fixed #16210 -- Added some missing __future__ imports to support with statements on 2.5. Thanks to Julien Phalip for the report and patch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 14:49:44 +00:00
Russell Keith-Magee aa5506d6f6 Fixed #16198 -- Ported the model_forms doctests. Our long national nightmare is over. Oh, and we have always been at war with doctests. Thanks to Peter van Kampen and Gregor Müllegger for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 14:08:51 +00:00
Ramiro Morales 4dac0883f0 Made `with` statements added in [16348] compatible with Python 2.5.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16357 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 12:16:56 +00:00
Andrew Godwin 44a2cbad35 Fixed #16182: Increase timestamp precision on TimestampSigner. Thanks to Eric Florenzano.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 11:54:42 +00:00
Luke Plant 66436ad171 Fixed #16166 - `EmailField` does not comply with SMTP standard
Thanks to qqq1one@yahoo.com for the report, and samufuentes for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16355 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 10:22:42 +00:00
Luke Plant 430b819967 Fixed #16196 - Redundant or incorrect code in tests
Thanks to intelliyole and melinath for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16354 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 10:18:06 +00:00
Russell Keith-Magee 9e952be26f Fixed #16201 -- Ensure that requests with Content-Length=0 don't break the multipart parser. Thanks to albsen for the report and patch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16353 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 08:39:38 +00:00
Russell Keith-Magee 046ffa483e Fixed #16185, #15675 -- Added the ability for test runners to define custom options, and to specify a custom test runner at the command line. Thanks to Dmitry Jemerov and Mikołaj Siedlarek for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16352 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-10 08:26:05 +00:00
Chris Beaven b56ef75088 Fixes #13511 -- make regex parameter to RegexValidator to be optional. Also tidies up related docs (parameters aren't attributes). Thanks for the patch work, davidfischer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16351 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 23:51:03 +00:00
Luke Plant db2f9bfae1 Fixed #16178 - Cleanup request classes' `__repr__()`
Thanks to julien for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16350 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 23:15:42 +00:00
Ramiro Morales dff31de20a Fixed #16155 -- Removed Python 2.4 compatibility constructs from code and mentions from docs. Thanks Aymeric Augustin for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16349 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 20:01:28 +00:00
Andrew Godwin da0c7cd777 Clean up unique validation tests to not use bare excepts and use assertRaises. Refs [16345].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 19:35:44 +00:00
Andrew Godwin dce278673a Fixed #9459: forms.HiddenInput and DateTime field loses microseconds. Thanks to mt.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 17:03:45 +00:00
Andrew Godwin 865d684a8a Fixed #8913 - Make "must be unique" error messages customisable. Thanks to Leah Culver.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16345 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 15:05:13 +00:00
Jannis Leidel 7f6675a5fb Stopped staticfiles from modifying INSTALLED_APPS during test runtime.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16344 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-09 13:13:19 +00:00
Luke Plant cb2c669d14 Fixed an unnecessary use of TransactionTestCase
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16341 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-08 23:09:32 +00:00
Luke Plant 207e3ed9d5 Fixed #14206 - dynamic list_display support in admin
Thanks to gabejackson for the suggestion, and to cyrus for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16340 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-08 22:53:55 +00:00
Luke Plant 45e55b9143 Fixed #14614 - filtering of sensitive information in 500 error reports.
This adds a flexible mechanism for filtering what request/traceback
information is shown in 500 error emails and logs. It also applies
screening to some views known to be sensitive e.g. views that handle
passwords.

Thanks to oaylanc for the report and many thanks to Julien Phalip for the
patch and the rest of the work on this.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16339 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-08 22:18:46 +00:00
Luke Plant bb12a02bd8 Deprecated legacy ways of calling cache_page
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16338 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-08 11:12:01 +00:00
Alex Gaynor 7a600166a7 Name this test method correctly. Refs [16334].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 20:59:07 +00:00
Alex Gaynor fcf8312ade Made clear() on a reverse foreign key significantly more efficient. Thanks to Andrew Godwin for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16335 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 20:51:59 +00:00
Carl Meyer 684b0396cf Fixed #14082 -- Use metaclass of provided ModelForm subclass in modelform_factory. Thanks jspiros and Stephen Burrows for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16334 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 16:15:54 +00:00
Jannis Leidel 64e19ffb4e Fixed #7704, #14045 and #15495 -- Introduce a lexer for Javascript to fix multiple problems of the translation of Javascript files with xgettext. Many thanks to Ned Batchelder for his contribution of the JsLex library.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16333 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-07 16:11:25 +00:00
Ramiro Morales 0638ba5bba Enhanced a bit the documentation and docstring for the url template tag. Also, added a test for it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16331 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-05 23:44:34 +00:00
Luke Plant d41a25ebc6 Fixed import error that was causing EggLoader tests not to be run
Also improved ImportError handling that was causing this fact to be missed.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16323 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-04 14:32:55 +00:00
Luke Plant cb996cce05 Fixed various bugs related to having multiple columns in admin list_display with the same sort field
Thanks to julien for the report

Refs #11868

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16319 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-03 11:54:29 +00:00
Luke Plant 5434ce231d Fixed #11868 - Multiple sort in admin changelist.
Many thanks to bendavis78 for the initial patch, and for input from others.

Also fixed #7309. If people were relying on the undocumented default ordering
applied by the admin before, they will need to add 'ordering = ["-pk"]' to
their ModelAdmin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16316 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-02 16:18:47 +00:00
Luke Plant 65cc646c48 Removed a broken test added in [16312]
This test caused a test failure (in subclass CustomModelAdminTest), and the
test also proved to be extremely brittle when trying to implement #11868,
and basically unfixable with current infrastructure.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16313 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-02 00:24:37 +00:00
Luke Plant 2304ca4236 Fixed bug with `__str__` headers in admin changelist have a non-functioning sort URL
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16312 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01 23:17:40 +00:00
Ramiro Morales 2367089392 Tweaked test added in [16308] so it doesn't fail.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01 22:09:50 +00:00
Alex Gaynor 06279e454a Fix the staticfiles_tests and django.conf to not think that None meant a lazy object hadn't been evaluated. Thanks to Jannis for informing me that I broke the test suite (if you were harmed by this I'll buy you a cookie). Sorry.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01 20:45:47 +00:00
Alex Gaynor 60cf3f2f84 Allow SimpleLazyObjects to return None without constantly being reevaluated, also proxy ``__nonzero__``, and do some codecleanup as well.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16308 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01 15:30:06 +00:00
Jannis Leidel 632dfa2338 Fixed #9200 -- Added new form wizard to formtools based on class based views. Many thanks to Stephan Jäkel, ddurham and ElliottM for their work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16307 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-06-01 13:47:00 +00:00
Luke Plant 4531767700 Fixed auth context processor tests, which were not running at all previously.
It seems they were accidentally disabled following being moved from
regressiontests in [15990]

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16304 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-31 15:19:19 +00:00
Luke Plant 93e9d91501 Fixed #15805 - assertFieldOutput should not use assertRaisesRegexp
Thanks to julien for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16303 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-31 14:02:22 +00:00
Luke Plant 524c5fa07a Fixed #14261 - Added clickjacking protection (X-Frame-Options header)
Many thanks to rniemeyer for the patch!

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16298 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-30 22:27:47 +00:00
Luke Plant dc4c2f3add Fixed #15929 - test.client.RequestFactory keeps state/AuthMiddleware does monkey patching
Thanks to m.vantellingen for the report and tests, and to aaugustin for
work on the tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16297 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-30 16:33:23 +00:00
Luke Plant de3b58d626 Fixed #15776 - delete regression in Django 1.3 involving nullable foreign keys
Many thanks to aaron.l.madison for the detailed report and to emulbreh for
the fix.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16295 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-30 16:04:25 +00:00
Jannis Leidel d34bb3c833 Fixed #16108 -- Fixed another race condition in the FileSystemStorage backend with regard to deleting a file. Refs #16082, too. Thanks, Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16287 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-28 13:06:08 +00:00
Ramiro Morales d0716044dd Changed a bit the strategy used to test staticfiles finders so they can cope with even more differences in case of paths under Windows. Refs #14961
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16285 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-27 10:55:07 +00:00
Ramiro Morales c3db0b058c Modified a couple of i18n regression tests to make them run under Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16281 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-26 21:03:56 +00:00
Jannis Leidel 723b620c7e Fixed #16082 -- Fixed race condition in the FileSystemStorage backend with regard to creating directories. Thanks, pjdelport.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16280 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-26 08:21:35 +00:00
Ramiro Morales 0065d8a120 Made expected output platform-independent in a test for the template postmortem debug 500 view so it doesn't fail under Windows.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16277 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-24 21:33:32 +00:00
Luke Plant a482cc0ba3 Fixed #16004 - csrf_protect does not send cookie if view returns TemplateResponse
The root bug was in decorator_from_middleware, and the fix also corrects
bugs with gzip_page and other decorators.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16276 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-24 21:28:43 +00:00
Jannis Leidel 4a4b6b271e Fixed #16080 -- Handle admin list filter items with two characters better. Thanks, Ales Zoulek and Julien Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16274 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-24 09:17:55 +00:00
Ramiro Morales c0303f5d81 Workaround particularities of Python under Windows that interfere with expected outputs in `admin_scripts` regression tests.
Thye were causing most of them to fail in such platform.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@16273 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-23 18:54:02 +00:00