Commit Graph

2705 Commits

Author SHA1 Message Date
Malcolm Tredinnick c471d471bf Improved error message display during validation errors.
When reporting a validation error (during model validation or fixture
loading, for example), the error messages now report the bad value as
well as the expected type. This can make identifying the offending field
and problem a bit easier.

Fixed #11595. Patch from raulcd and wildfire with supervision from
Russell.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16638 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-22 00:48:53 +00:00
Ramiro Morales 4df45418f2 Fixed #16644 -- Fixed one additional test that was failing in Oracle due to false assumptions about the primary keys of objects. Thanks Aymeric Augustin for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16636 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-21 18:09:08 +00:00
Jannis Leidel 7d782e51c1 Fixed #8190 -- Added support for a field's help text to the tabular admin inline. Thanks, Julien Phalip and Idan Gazit.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16622 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-17 14:12:25 +00:00
Jannis Leidel 283526a5a6 Fixed #15206 -- Added select_related call to the permissions field of the GroupAdmin to lower the number of queries. Thanks, Chris Adams.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16620 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-15 09:01:12 +00:00
Jannis Leidel a13de6cd76 Fixed #6644 -- Fixed django.contrib.formtools tests to be better isolated when running outside of the Django test suite. Also moved around the new wizard's templates a bit to better fit the common app layout.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16616 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13 13:51:34 +00:00
Jannis Leidel 1abafe696e Fixed #14695 -- Stopped model fields from incorrectly overwriting the field name during model initialization if it was already passed as a keyword argument. Thanks, erikrose and willhardy.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16614 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13 11:53:42 +00:00
Ramiro Morales 326949e444 Fixed #14503 -- Unified multiple implementations of test cases assert* methods that verify a given exception is raised by a callable throughout the Django test suite.
Replaced them with a new assertRaisesMessage method of a new SimpleTestCase, a lightweight subclass of unittest.TestCase. Both are also available for usage in user tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16610 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-13 00:42:08 +00:00
Jannis Leidel 02dcbe3317 Fixed #11559 -- Fixed the URL resolver to be able to handle captured parameters in parent URLconfs when also using namespaces. Thanks, cwb, ungenio and hvdklauw.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16608 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:15:50 +00:00
Jannis Leidel 351d5da69b Fixed #4617 -- Added `raise_exception` option to `permission_required` decorator to be able to raise a PermissionDenied exception instead of redirecting to the login page.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:15:41 +00:00
Jannis Leidel 1ca6e9b9e2 Fixed #9847 -- Added 403 response handler. Many thanks to kgrandis, adamnelson, vkryachko, fvox13 and Chris Beaven.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16606 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:15:31 +00:00
Jannis Leidel 958e049d4d Fixed #5831 -- Made sure the ForNode reports the correct source of an exception happening in one of the loops. Thanks, Charmless and vladmos.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16605 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:15:17 +00:00
Jannis Leidel 1d485cf14f Fixed #10405 -- Raise a more useful error if the formfield of a related model field can't be created yet because the related model isn't loaded yet. Thanks ojii and charstring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16604 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:15:08 +00:00
Jannis Leidel 386b12c1c6 Fixed #15907 -- Fixed another conflict between the ModelForm exclude and the GenericInline. Thanks, leonelfreire and prestontimmons.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:58 +00:00
Jannis Leidel 3d027b72eb Fixed #14496 -- Fixed conflict between ModelForm exclude and ModelAdmin readonly values. Thanks, Julien Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16602 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:49 +00:00
Jannis Leidel d68666700f Fixed #16604 -- Use new save_related hook when saving objects on the changelist, too. Thanks, pdeglopper.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16599 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:24 +00:00
Jannis Leidel bce890ace4 Fixed #16584 -- Fixed a bunch of typos in code comments. Thanks, Bernhard Essl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16598 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 14:14:15 +00:00
Jannis Leidel 4a993fab18 Set STATIC_ROOT in test runner settings to make sure the admin tests pass. Thanks to Julien Phalip for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16597 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-12 08:43:52 +00:00
Jannis Leidel 1d32bdd3c9 Fixed #15252 -- Added static template tag and CachedStaticFilesStorage to staticfiles contrib app.
Many thanks to Florian Apolloner and Jacob Kaplan-Moss for reviewing and eagle eyeing.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16594 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-11 14:07:39 +00:00
Ramiro Morales e9a909e30a Fixed #16593 -- Refactored proxy_model_inheritance fixture setup to minimize the chances of leaving a modified INSTALLED_APPS setting for tests ran after it if setUp fails. Thanks Jim Dalton for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16593 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-10 22:34:45 +00:00
Ramiro Morales 27eb8bbfd0 Made override_settings also work with TransactionTestCase when acting as a class decorator.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16592 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-10 22:26:34 +00:00
Ramiro Morales 4fc3741ee8 Added fixtures files missing from [16590].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-08 17:08:35 +00:00
Karen Tracey be87f0b0ec Fixed #3615: Added support for loading fixtures with forward references on database backends (such as MySQL/InnoDB) that do not support deferred constraint checking. Many thanks to jsdalton for coming up with a clever solution to this long-standing issue, and to jacob, ramiro, graham_king, and russellm for review/testing. (Apologies if I missed anyone else who helped here.)
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16590 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-07 00:43:26 +00:00
Ramiro Morales 290d7d4d21 Fixed #16542 -- Made Raw ID form widgets shipped with the admin app render the related object lookup tool only when the related model is effectively registered with the AdminSite.
Also, converted these widgets to reverse named URLs instead of hard-coded '../../...'-style links, refs #15294.
Thanks Florian Apolloner for the initial patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16578 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-01 23:38:11 +00:00
Jannis Leidel 343b4f1ea5 Fixed #14288 -- Fixed linebreaksbr template filter to normalize newlines first. Thanks, Julien Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16573 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 10:22:25 +00:00
Jannis Leidel 0fbadfd1c8 Fixed #16497 -- Added new form and model fields to the Mexican local flavor. Many thanks to Andrés Torres Marroquín and Gerardo Orozco.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16572 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 10:20:16 +00:00
Jannis Leidel 4a6e1b5613 Fixed #8013 -- Added Columbian and Ecuadorian local flavor. Thanks, ikks and Bernhard Essl.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16570 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:41:14 +00:00
Jannis Leidel 2ccfb6d5c2 Fixed #16101 -- Added parameters to SingleObjectMixin to override the name of the URL keyword arguments used for pk and slug. Thanks, Andrew Ingram and Julien Phalip.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16569 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:41:00 +00:00
Jannis Leidel 5fffe574bd Fixed #16326 -- Fixed re-pickling of unpickled TemplateResponse instances. Thanks, natrius and lrekucki.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16568 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:40:50 +00:00
Jannis Leidel db594f90ba Fixed #16533 -- Stopped the memcache cache backend from raising an exception if the timeout value isn't an integer. Thanks, Jeff Balogh.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16556 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-29 09:39:23 +00:00
Chris Beaven 34a71dc4e4 Add some simple regression tests for the truncatechars filter. Refs #16510.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-25 22:18:59 +00:00
Ramiro Morales 0452d4c3cc Fixed #16480 -- Modified test added in r16522 so it doesn't use a query not supported under Oracle (`GROUP BY` a NCLOB field). Thanks Aymeric for the report. Refs #4186
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16546 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-17 22:22:39 +00:00
Jannis Leidel 3b77458371 Fixed #5025 -- Add a "truncatechars" template filter. Many thanks to Chris Beaven.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16542 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-14 13:47:10 +00:00
Jannis Leidel 24f4764a48 Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for the work on the patch and Alex for reviewing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-13 09:35:51 +00:00
Jannis Leidel 723b574793 Fixed #16447 -- Stopped using the setting name as the sender parameter for the setting_changed signal. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-10 19:35:05 +00:00
Ramiro Morales 54b9c03d80 Fixed a typo in the `multiple_database` tests. Thanks Jim Dalton.
Also, removed some unused imports.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16529 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-10 13:52:04 +00:00
Ramiro Morales 823a231500 Fixed typos in admin_views tests XML fixtures.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16527 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-08 14:22:36 +00:00
Luke Plant 6d029359e9 Fixed bug with our SimpleCookie regarding load/custom Morsel, and simplified implementation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-08 12:07:54 +00:00
Ramiro Morales 68d18b8492 FIlter warnings about deprecated syntax of the `url` template tag in recently added tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16524 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-08 00:39:59 +00:00
Ramiro Morales b2050ff546 Fixed #16409 -- Fixed an error condition when using QuerySet only()/defer() on the result of an annotate() call. Thanks jaklaassen AT gmail DOT com and Tai Lee for the reports and Tai for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-07 01:12:45 +00:00
Jannis Leidel 21e0b3a243 Fixed #16424 -- Fixed regression in collect static management command introduced in r16509 that prevented prefixed collection.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16519 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-06 10:28:18 +00:00
Jannis Leidel 89c302cf3f Rolled back r16510, r16513 and r16514 because it wasn't ready.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16515 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05 14:16:37 +00:00
Jannis Leidel b37dca1aec Removed left over print statement.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05 13:56:20 +00:00
Jannis Leidel b884990388 Made cache table test case multidb capable. Refs #16411. Thanks, Russ.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05 13:55:14 +00:00
Jannis Leidel 2b2bec0cc9 Fixed test failure on Postgres that was added in r16510.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05 09:40:29 +00:00
Jannis Leidel 90b6181657 Fixed #16410 -- Fixed get_cache to behave gracefully when given a string that can't be split. Thanks, jedie.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16511 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-05 09:10:58 +00:00
Jannis Leidel 6de65ab76f Fixed #15255 -- Stopped database cache from ignoring database routers when creating the cache table. Thanks, aaugustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16510 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 21:53:17 +00:00
Jannis Leidel 94a38dfd0e Fixed #16161 -- Added `--clear` option to `collectstatic` management command to be able to explicitly clear the files stored in the destination storage before collecting.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 21:34:29 +00:00
Ramiro Morales 87eb3a25aa Removed superflous commented-out lines.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 12:23:12 +00:00
Jannis Leidel 286a1cad88 Fixed #16332 -- Added language template tag that switches the activate language for the enclosed template section, e.g. to allow translation of URLs as added in r16405. Many thanks to Florian Apolloner and Orne Brocaar.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-04 09:52:06 +00:00
Ramiro Morales 6b31300057 Renamed a test model field added in [16345] so it doesn't keep the test DB ceation process from finishing under Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16499 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-07-03 22:15:39 +00:00