Commit Graph

2946 Commits

Author SHA1 Message Date
Aymeric Augustin d17bc72880 Fixed #17135 -- Made it possible to use decorators (like stringfilter) on template filter functions in combination with auto-escaping. Refs #16726.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17056 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-30 07:32:21 +00:00
Ramiro Morales bebbc9e4a5 Made a couple of changes for readability and correctness in loaddata.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17055 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 22:32:28 +00:00
Aymeric Augustin 0a1a9b71fa Made the defaultfilters tests run on the actual filters, not on functions imported from django.utils.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17054 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 15:28:44 +00:00
Ramiro Morales 345be05622 Enhanced loaddata error message printed when no DB fixture is provided.
Fixes #7043 by fixing the last code path where a misleading 'No fixtures found.' error message was being shown.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17051 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 14:47:45 +00:00
Ramiro Morales 24f3c06e4a More django.conf.urls.defaults removals. Refs #17132
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17049 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-29 12:24:44 +00:00
Carl Meyer 7a718f0f3a Fixed #17127 -- Made field validators list independent per form instance. Thanks claudep for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17046 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-28 14:38:41 +00:00
Julien Phalip b87114962f Tweaked some `AutoField` tests to not raise wanings in Python>=2.6, where `BaseException.message` has been deprecated.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17045 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-28 04:11:41 +00:00
Aymeric Augustin a693bbe0ac Fixed a test isolation problem that remained after r17042.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17043 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-27 06:17:24 +00:00
Aymeric Augustin 0cf139d201 Fixed several problems that hid one another in the cache tests and code.
1 - Used django.test.TestCase instead of unittest.TestCase so that the override_settings decorator works.
2 - Reverted parts of r17039 that caused failures (masked until 1).
3 - Isolated tests by clearing the cache in tear down (masked until 1). Refs #11505.
4 - Fixed a bug in cache key generation (revealed by 3).
5 - Fixed a test that relied on this bug -- hardcoding the generated cache keys in tests isn't a very good idea anyway.
6 - Uniformized some parts of the cache tests.



git-svn-id: http://code.djangoproject.com/svn/django/trunk@17042 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 22:47:04 +00:00
Carl Meyer 233cdcf424 Fixed error message string assumptions in WSGI tests (were breaking tests on PyPy). Thanks to Alex Gaynor for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17041 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 21:07:12 +00:00
Aymeric Augustin 4cfb7632e0 Removed remains from times when tests could be run outside of runtests.py.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17040 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 21:03:18 +00:00
Aymeric Augustin 4819797f70 Improved settings manipulation in the cache tests with the suitable decorators and context managers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17039 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 20:55:36 +00:00
Julien Phalip 9796f69533 Fixed #16257 -- Added new `ModelAdmin.get_list_display_links()` method to allow for the dynamic display of links on the admin changelist. Thanks to graveyboat for the suggestion and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17037 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 12:19:18 +00:00
Julien Phalip 600c576ac5 Fixed #17090 -- Made the API specification for `ModelAdmin.get_list_display()` more consistent with that of `ModelAdmin.list_display` by separating out the admin action check boxes business. This is backwards-incompatible for those who have been using the still-unreleased `get_list_display()` method. Thanks to Ramiro Morales for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17035 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 09:37:07 +00:00
Julien Phalip 4d79083453 Fixed #17111 -- Made the `redirect_to` generic view properly handle query strings with percent symbols. Thanks, Chris Adams.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17034 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 06:33:13 +00:00
Julien Phalip 2e2689c7c0 Fixed #15938 -- Prevented the `max_length` number in the admin `prepopulated_fields` javascript to be localized when `USE_THOUSAND_SEPARATOR` is turned on. Thanks to Lev Maximov, Mathieu Agopian and feel.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17033 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-26 05:33:17 +00:00
Aymeric Augustin 965c5d7cce Fixed #14202 -- made the atom:link element optional in feeds.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17029 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-23 15:19:09 +00:00
Julien Phalip 4f00a2d316 Fixed #15826 -- Made `assertContains` and `assertNotContains` work with `SimpleTemplateResponse` by forcing it to be rendered if it hasn't been rendered yet. Thanks to bmihelac for the report, to mmcnickle for the initial patch and tests, and to Carl Meyer for the guidance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17025 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 09:15:50 +00:00
Carl Meyer 145a77edc9 Fixed #16360 -- Added WSGI entrypoint to startproject layout, and enabled internal servers (runserver and runfcgi) to use an externally-defined WSGI application. Thanks to Armin Ronacher, Jannis Leidel, Alex Gaynor, ptone, and Jacob Kaplan-Moss.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17022 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-22 04:30:10 +00:00
Julien Phalip 1452cecd15 Fixed 16938 -- Ensured that the active locale's formats take precedence over the default settings even if they would be interpreted as False in a conditional test (e.g. 0 or empty string). Thanks to pikerr for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17017 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-20 12:14:06 +00:00
Julien Phalip 26698bc851 Fixed #14806 -- Added support for contextual translations to the `trans` and `blocktrans` template tags. Thanks to jtiai for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17015 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-19 04:59:47 +00:00
Aymeric Augustin 2bc77be12e Fixed #17054 -- Ensured the test suite runs when gettext isn't available, after r16981.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17013 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18 20:35:42 +00:00
Aymeric Augustin 14d24eb438 Fixed #17067 -- reverted some backwards-incompatible changes from r16933 and added tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17010 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-18 16:42:32 +00:00
Ramiro Morales da5c766dbb Tweaked test added in r16873 so it also works with Oracle.
* Changed invalid fixture from trying to insert a NULL value in a
  null=False CharField to try with a DateTimeField instead because our
  Oracle backend allows NULLs for CharFields than can be blank and that
  insert wouldn't generate an error.

* cx_Oracle raises a
  `DatabaseError: Could not load fixtures.Article(pk=1): ORA-01407: cannot update ("USER_DEFAULT"."FIXTURES_ARTICLE"."PUB_DATE") to NULL'`
  instead of an IntegrityError like the rest of the DB-API drivers we
  support, changed the error message we test for to start simply with
  'Error' to catch both messages.

  We might want to consider converting DatabaseError to IntegrityError
  in the backend when the error code is ORA-1407.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 03:29:07 +00:00
Ramiro Morales ab72e6bdd1 Tweaked a tests tweak from r16960 so it uses the right model.
When testing for permission enforcement in the admin for m2m
relationships we were erroneously using the ID of the related model
instead of using the ID of the corresponding automatically created
intermediate model. This manifested as a failure under Oracle but can
fail with any backend if the IDs of both models diverge.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17001 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 02:11:12 +00:00
Ramiro Morales d48510cc6b Tweaked admin_scripts tests enhanced in r16964 a bit more so they don't fail with Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16999 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-17 00:34:42 +00:00
Ramiro Morales 5f2be4ecbb Fixed #17056 -- Tweaked insert SQL clause generation so a corner case doesn't fail with Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16997 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 20:06:59 +00:00
Aymeric Augustin b7f2aba566 Fixed a test that relied on the database to reject invalid data; MySQL doesn't. Refs #17055.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16996 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 14:30:43 +00:00
Aymeric Augustin 8fb7a90026 Fixed multiple database tests that broke foreign keys constraints. Refs #17055.
The problem was masked by the rollback at the end of each transactional test on backends that deferred constraints checks; it appeared only on MySQL + InnoDB.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@16995 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 11:04:34 +00:00
Aymeric Augustin 03316579f4 Fixed a test that depended on how identifiers are quoted by the database backend and broke under MySQL. Refs #17055.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16994 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 09:51:22 +00:00
Julien Phalip d3cd9c0d06 Made an `AutoField` test more robust.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16992 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 06:57:25 +00:00
Julien Phalip 93a581431a Fixed #15221 -- Made the admin filters on foreign key and m2m relationships display the related field's verbose name instead of that of the related model.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16991 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-16 06:42:50 +00:00
Aymeric Augustin c582609c8d Modified the tablespaces tests so that they no longer rely on settings.DEFAULT_INDEX_TABLESPACE being empty. Refs #12308.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16990 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-15 15:54:53 +00:00
Aymeric Augustin 22d738c2dc Ensured that the feeds framework supports both datetimes and dates. Refs #4076.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-15 10:16:24 +00:00
Aymeric Augustin a8e1d134a5 Fixed a test failure introduced at r16987. Refs #12308.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-15 09:00:31 +00:00
Aymeric Augustin 246580573d Fixed #12308 -- Added tablespace support to the PostgreSQL backend.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-14 21:49:43 +00:00
Alex Gaynor 69e1e6187a Switch several assertNumQueries to use the context manager, which is much more beautiful.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16986 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-14 17:03:08 +00:00
Alex Gaynor 6c91521902 Remove the usage of deprecated function in Django. Also simplify the fallback code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16985 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-14 00:20:50 +00:00
Alex Gaynor 5109ac3709 Fix a Python 2.5-ism.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16982 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 21:44:58 +00:00
Alex Gaynor 8c0eefd066 Convert the remainder of the relative imports in the tests to be absolute imports.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 21:34:56 +00:00
Aymeric Augustin f830166167 Fixed #16899 -- Backported the fix for http://bugs.python.org/issue9063 and added a test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16980 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 21:19:48 +00:00
Aymeric Augustin 06d9b82a27 Fixed #16906 -- Format datetimes with str/unicode instead of strftime where possible: it's faster and it works for all dates.
Also ensured that datetime_safe is used wherever strftime is called on dates/datetimes that may be before 1900.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@16978 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 19:23:45 +00:00
Alex Gaynor b7845768cb Fix the dispatch tests on python 2.5
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16977 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 19:18:27 +00:00
Alex Gaynor d362c1546f Convert much of the regression tests to use absolute imports. There's still work to be done though.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16976 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 18:51:33 +00:00
Alex Gaynor d5a45d79fe Convert all modeltests to use absolute imports, rather than relative ones.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16975 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 18:04:12 +00:00
Julien Phalip 99512d3544 Fixed #16918 -- Ensured that custom querysets are used when provided to `BaseDateDetailView.get_object()`. Thanks to mitar for the report, to koenb for the patch and to Preston Holmes for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16974 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 13:38:38 +00:00
Alex Gaynor 43920cd32e Remove a handful of `import *` from the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16973 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 12:53:02 +00:00
Julien Phalip c58e5724bc Fixed a couple of `assert` syntax warnings mistakingly introduced in r16966 and added some tests to prevent future regressions. Thanks to Anssi Kääriäinen for the report.
Refs #12467.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16971 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 11:53:59 +00:00
Julien Phalip 3b22c68343 Fixed #12467 -- Made the model data validation for `DateField` and `DateTimeField` more useful by actually telling what was the value that failed. Also did a bit of PEP8 cleanup in the area. Thanks to knutin for the report, to raulcd for the initial patch and to charettes for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16966 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 08:11:00 +00:00
Carl Meyer 38f1fe3b35 Fixed #15372 -- Switched to a startproject default layout that allows us to avoid sys.path hacks.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16964 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-13 05:56:15 +00:00
Carl Meyer 8b801a7553 Fixed some tests from r16934 to be auto-id-independent.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16960 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-11 21:55:45 +00:00
Julien Phalip 17659adf93 Fixed #16371 -- Added a prefix "field-" to all CSS class names automatically generated from field names in admin forms to avoid conflicts with other common class names (e.g. "button"). This is backwards-incompatible for those who previously used plain field names as selector in custom style sheets or javascript transformations.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16953 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-10 12:35:06 +00:00
Julien Phalip 095dbe8804 Made the tests introduced in r16942 use old-style class decoration to run with Python < 2.6.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16943 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-08 11:36:05 +00:00
Carl Meyer b6ad1afa68 Fixed #17011 - Made override_settings modify a decorated class in-place rather than creating a dynamic subclass, so as to avoid infinite recursion when used with super(). Thanks jsdalton for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16942 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-08 08:16:17 +00:00
Luke Plant 052a011ee6 Fixed #17003 - prefetch_related should support foreign keys/one-to-one
Support for `GenericForeignKey` is also included.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16939 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-07 16:05:53 +00:00
Carl Meyer b1b1da1eac Fixed #8060 - Added permissions-checking for admin inlines. Thanks p.patruno for report and Stephan Jaensch for work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-07 00:41:25 +00:00
Aymeric Augustin e2f9c11736 Fixed #16705 - Made the test client adhere to the WSGI spec -- in particular, removed the assumption that environ['QUERY_STRING'] exists.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16933 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-06 20:39:15 +00:00
Luke Plant 662eea116f Fixed #16937 - added `QuerySet.prefetch_related` to prefetch many related objects.
Many thanks to akaariai for lots of review and feedback, bug finding,
additional unit tests and performance testing.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-05 23:14:52 +00:00
Ramiro Morales 0d9b6a5bc4 Fixed #10841 -- Switched response served when DEBUG=True and request.is_ajax() returns True (indicating request has been generated by a JS library) to a plain text version for easier debugging.
Contents of this response are similar to its HTML counterpart modulo frame variables values in the Python traceback section.

Thanks to Riz for the report, to SmileyChris for the patch and to Julien for reviewing.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16921 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-10-02 02:53:58 +00:00
Ian Kelly 21a449168b Fixed #16645: fixed a broken test to work in Oracle.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16919 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-30 21:40:56 +00:00
Ramiro Morales bf05da876a Fixed #8160 -- Made sure `modelformset_factory` takes in account `fields' and `exclude` ModelForm options.
Thanks Andrew McMurry for the report and Claude Paroz for creating these tests.

(Actually, this had been fixed in r10619 but the tests added then exercise the
code in the context of ModelAdmin. This commit adds more generic tests.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16918 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-30 20:53:39 +00:00
Luke Plant 10d90cba83 Fixed #16935 - misleading message if AttributeError escapes during SimpleTemplateResponse.render
Thanks to isagalaev for the report.

As discussed on django-devs, this reverts some of the changes in [16568]
i.e.  the addition of `SimpleTemplateResponse.__getattr__`, because this
makes it much harder to debug the common case of an AttributeError somewhere
during the rendering of a SimpleTemplateResponse.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-30 11:46:23 +00:00
Luke Plant 5009e45dfe Fixed #14270 - related manager classes should be cached
Thanks to Alex Gaynor for the report and initial patch, and mrmachine for
more work on it.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16916 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-30 10:41:25 +00:00
Jannis Leidel 2eadc418af Fixed doc references to `django.db.models.query.QuerySet` and converted some tabs that were introduced in r16699 to spaces.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16915 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-30 10:28:39 +00:00
Julien Phalip 8137027fd7 Fixed #13956 -- Enabled `*args` and `**kwargs` support for `simple_tag`, `inclusion_tag` and `assignment_tag`. Many thanks to Stephen Burrows for the report and initial patch, to Gregor Müllegger for the initial tests, to SamBull for the suggestions, and to Jannis Leidel for the review and PEP8 cleanup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16908 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-27 12:15:15 +00:00
Alex Gaynor 11c1e61b99 Fixed #16925 -- Make sure a signal is disconnected if the test fails. Thanks to aaugustin for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16905 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-26 10:11:18 +00:00
Ramiro Morales 3ef1762cb9 Fixed #16924 -- Corrected `date` template filter handling of negative (West of UTC) timezone offsets.
The 'O' format specifier output was incorrect. Thanks mrgriscom and Aymeric Augustin.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16903 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-25 17:08:31 +00:00
Jannis Leidel 6cae2a550d Fixed #16878 -- Improved intword filter to support numbers up to decillion and googol. Thanks to crodjer for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16897 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-23 16:45:40 +00:00
Paul McMillan 4dab2d2f6b Fixed a typo in test docstring.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 23:30:05 +00:00
Gabriel Hurley 39bbd1653a Fixed #7198 (again) -- Corrects a problem with string interpolation from r16876 and adds tests for the new error message.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16888 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 21:09:00 +00:00
Jannis Leidel 66dc22c2d9 Fixed #16909 -- Pass language to get_format_modules when calling it from get_format to make sure the correct module is returned.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16884 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 15:04:27 +00:00
Paul McMillan 0bd0bb7c22 Refs r16873 and #16026 -- Missed adding the fixture.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 05:56:47 +00:00
Paul McMillan 1d96d886e7 Fixed #16026 -- loaddata now identifies which object triggered an error.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16873 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 04:30:20 +00:00
Paul McMillan 0781ed8ec8 Fixed #16837 -- Improved error message for admin login.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16872 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-22 04:16:21 +00:00
Jannis Leidel c4cc875643 Fixed #16703 -- Raise an exception if the storage location of the DefaultStorageFinder is empty.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16863 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 15:58:32 +00:00
Jannis Leidel eb5df8e98d Fixed the relative static file resolution of the CachedStaticFilesStorage backend and the post processing of deeply nested static files.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16862 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 15:58:21 +00:00
Carl Meyer 75199e8f6d Fixed #16866 -- Clearer error message if empty list is passed to select_template. Thanks Silver_Ghost for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 14:20:18 +00:00
Carl Meyer 09a01435de Fixed #16838 -- Corrected broken add-another inline JS in admin with related_name="+". Thanks jamesp for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16860 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-21 14:00:58 +00:00
Ramiro Morales aaf77c1676 Converted internal link generation in the admin and admin document generator to use named URLs.
Thanks to Florian Apolloner for both the initial patch and his final push to get
this fixed, to Dario Ocles for his great work on the admin templates and
switching the admin_doc application to also use named URLs, to Mikko Hellsing
for his comments and to Jannis and Julien for their review and design guidance.

Fixes #15294.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-20 18:30:06 +00:00
Ramiro Morales 7b21bfc074 Improved test isolation of the admin tests and assigned custom admin sites to
prevent test order dependant failures.

This involves introducing usage of `TestCase.urls` and implementing proper
admin.py modules for some of the test apps.

Thanks Florian Apolloner for finding the issue and contributing the patch.

Refs #15294 (it solves these problems so the fix for that ticket we are going
to commit doesn't introduce obscure and hard to reproduce test failures when
running the Django test suite.)

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16856 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-20 18:16:49 +00:00
Julien Phalip 436aeb6e15 Fixed #16676 -- Corrected the behavior of the 'add' template filter to return an empty string instead of the given value unchanged in the case of an invalid use. Thanks to dtrebbien for the report and to Aymeric Augustin for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16851 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-18 08:33:39 +00:00
Chris Beaven e63fa0ff83 Fixes #8103 -- Select widget should only allow for one selected option
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16848 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-18 04:09:44 +00:00
Carl Meyer 343004c4de Fixed #16568 -- Added RequireDebugFalse filter to prevent sending 500 error emails when DEBUG is True in projects with no explicit LOGGING setting. Thanks to Andreas Pelme for report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16 16:41:38 +00:00
Carl Meyer f9dad46d36 Fixed #16803 -- Use model verbose_name directly as ContentType unicode representation so it can be translated. Thanks to bronger for the report and Ivan Sagalaev for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16839 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16 11:57:03 +00:00
Carl Meyer 4397c587a4 Fixed #16770 -- Eliminated TemplateSyntaxError wrapping of exceptions. Thanks to Justin Myles-Holmes for report and draft patch.
Exceptions raised in templates were previously wrapped in TemplateSyntaxError
(in TEMPLATE_DEBUG mode only) in order to provide template source details on
the debug 500 page. The same debug information is now provided by annotating
exceptions rather than wrapping them. This makes catching exceptions raised
from templates more sane, as it's consistent in or out of DEBUG, and you can
catch the specific exception(s) you care about rather than having to also catch
TemplateSyntaxError and unwrap it.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16833 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-16 01:16:25 +00:00
Paul McMillan 50255e3305 Fixed #16494 by normalizing HttpResponse behavior with non-string input. HttpResponse now always converts content to string on output, regardless of input type.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16829 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-14 23:27:35 +00:00
Jannis Leidel f3ae496201 Fixed #16833 -- Removed undocumented `mixin` parameter from the `Storage.open()` method as this was an undocumented and obscure feature. Thanks to Marty and Russell for sanity-checking.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16824 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-13 15:10:49 +00:00
Ramiro Morales 26b8122087 Fixed #14675 -- Completed removal of `from django.conf.urls.default import *` usage.
This applies to both our own [test] code and documentation examples. Also:
 * Moved the functions and handlers from `django.conf.urls.defaults` up to
   `django.conf.urls` deprecating the former module.
 * Added documentation for `handler403`.
 * Tweaked the URLs topic document a bit.

Thanks to pupeno and cdestigter for their great work contributing patches.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16818 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-11 22:36:16 +00:00
Alex Gaynor b45a4acf6f Ensure bulk_create returns the right value if the argument is an empty list.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16792 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 21:46:59 +00:00
Alex Gaynor f2bc919ec0 Ensure bulk_create returns what it is supposed to.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16791 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 21:44:57 +00:00
Russell Keith-Magee 8d6c251731 Fixed #16592 -- More test changes and documentation to account for MySQL's casual relationship with sanity. Thanks to Jim Dalton for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16787 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 20:06:10 +00:00
Russell Keith-Magee fcee0c1b66 Fixed #16809 -- Forced MySQL to behave like a database. This avoids a problem where queries that do IS NONE checks can return the wrong result the first time they are executed if there is a recently inserted row. Thanks to James Pyrich for the debug work and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16785 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 18:58:30 +00:00
Russell Keith-Magee 161c6328a0 Fixed #16490 -- Skipped a test failure that only occurs under Python 2.6.1 (it's the old iteration-eats-exceptions problem).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16784 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 18:44:33 +00:00
Alex Gaynor efb8327444 Fixed #16808, removed some dead code from teh ORM. Thanks to aaugustin for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16782 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 17:38:58 +00:00
Russell Keith-Magee eb297583b1 Refs #16490 - Add a commit to ensure that a fresh read is provided; this is only a problem for databases in REPEATABLE READ mode, which is MySQL InnoDB's default. Thanks to Jim Dalton for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16781 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 17:29:33 +00:00
Alex Gaynor 67dde2f52f Fixed #16162. Added timeout arg to `DummyCache.set_many`, for compatiblity with other caches. Thanks to aaugustin for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16778 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 17:09:23 +00:00
Alex Gaynor d14bf8c62b Fixed #11404. Added ``FormSet.has_changed``, for consistancy with ``Form.has_changed``. Thanks to michelts for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16773 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 02:42:05 +00:00
Alex Gaynor 01b0eb50fd Make ``Formset.__getitem__`` O(1), rather than O(n). If you override ``__iter__`` you now need to also override ``__getitem__`` for consistant behavior. Thanks to Carl and Russ for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16770 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 01:53:56 +00:00
Russell Keith-Magee 5f287f75f2 Altered the behavior of URLField to avoid a potential DOS vector, and to avoid potential leakage of local filesystem data. A security announcement will be made shortly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16760 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 00:47:00 +00:00
Russell Keith-Magee 893cea211a Added protection against spoofing of X_FORWARDED_HOST headers. A security announcement will be made shortly.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16758 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 00:46:38 +00:00
Karen Tracey e061b036a5 Fixed #15722: ensure formsets evaluate to True even if they have no forms. Thanks mlavin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16756 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-10 00:05:48 +00:00
Russell Keith-Magee 228654d17f Added two pointless query repeats to work around a known issue with MySQL that was causing failures in our test suite.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16753 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 23:02:33 +00:00
Chris Beaven 470c70f876 Fixes #16664 -- URLField's to_python method fails with ValueError on some urls on python 2.7. Based on patch by zigzag.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16752 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:57:12 +00:00
Chris Beaven fe88584589 Fix and test for cleaning a non-string value in a URLField
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16747 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 22:32:38 +00:00
Alex Gaynor 7deb25b8dd Fixed #7596. Added Model.objects.bulk_create, and make use of it in several places. This provides a performance benefit when inserting multiple objects. THanks to Russ for the review, and Simon Meers for the MySQl implementation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16739 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 19:22:28 +00:00
Jannis Leidel e55bbf4c3c Fixed #15237 -- Fixed a typo in specifying UTF-8 encoding in the feed generator and signing tests. Thanks, Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16738 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 18:34:33 +00:00
Jannis Leidel 8258fe7845 Fixed #16042 -- Use the content types caching in the comments contrib app. Thanks, ptone, Julien Phalip and Thejaswi Puthraya.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16737 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 18:34:24 +00:00
Karen Tracey 64e16c094b Add a test for the intcomma regression described in #16404/#16562, fixed in r16726. Refs #16404.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16736 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 17:57:45 +00:00
Russell Keith-Magee dc3b2a0fdf Fixed #16780 -- Removed a timing sensitive test from the template test suite. Thanks to Alex for the lend of his eyeballs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16735 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-09 17:54:04 +00:00
Jannis Leidel 387e192f25 Fixed #16721 -- Made sure that blocktrans correctly handles percents (%), even in the plural block. Thanks for the initial patch, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16730 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:25:41 +00:00
Jannis Leidel 7cb140e6d8 Fixed #16003 -- Restored compatibility of the admin when using USE_ETAGS. Thanks for the initial patch, pterk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16729 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:25:31 +00:00
Jannis Leidel 2189a8e50a Fixed #16686 -- Reduced time to wait for cache expiration in a test to alleviate race-condition-y effects.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:25:24 +00:00
Jannis Leidel cf70c96ce0 Fixed #15997 -- Added `list_max_show_all` option to `ModelAdmin` in replacement for a global module level variable. Thanks, jsdalton.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16725 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:25:00 +00:00
Jannis Leidel 16bb9c594c Fixed #16516 -- Relaxed the blocktrans rendering a little by falling back to the default language if resolving one of the arguments fails, raising a KeyError. Thanks, Claude Paroz and Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16723 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-08 13:24:41 +00:00
Ramiro Morales 2b4341d532 Also copy `__module__` to our dynamically created TestCase subclass when override_settings acts as a class decorator.
Otherwise, an error in e.g. a test in tests/modeltests/proxy_model_inheritance/tests.py
was being reported as:

ERROR: test_table_exists (django.test.utils.ProxyModelInheritanceTests)

Refs #16672 and [16650].

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16722 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-04 22:51:53 +00:00
Julien Phalip de35a3ab14 Fixed #16736 -- Enabled the merging of user-supplied arguments to format the error emails' subject in `AdminEmailHandler`.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16715 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-09-02 03:04:02 +00:00
Jannis Leidel 3256862f5f Fixed #16717 -- Added ability to store result of trans template tag in context variable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16712 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-30 12:09:45 +00:00
Julien Phalip 6757568bfa Fixed #16202 -- Added a Slovenian localflavor. Thanks to Jure Cuhalev < gandalf@owca.info>, Gasper Zejn and Domen Kozar for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16706 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-28 13:51:28 +00:00
Julien Phalip 93fbb77d9b Fixed #16716 -- Fixed two small regressions in the development version introduced in r16144 where the changelist crashed with a 500 error instead of nicely operating a 302 redirection back to the changelist.
The two specific cases were:

* a lookup through a non-existing field and apparently spanning multiple relationships (e.g. "?nonexistant__whatever=xxxx").
* a proper list_filter's queryset failing with an exception. In Django 1.3 the queryset was only directly manipulated by the changelist, whereas in 1.4 the list_filters may manipulate the queryset themselves. The fix here implies catching potential failures from the list_filters too.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-28 07:57:56 +00:00
Julien Phalip ce477f0873 Repaired an admin list_filter test that wasn't testing anything special.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16704 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-28 06:49:29 +00:00
Chris Beaven 0f8f46802a Fixed #15525 -- Custom template tags loading breaks whenever templatetags is a python file
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16703 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-28 02:37:16 +00:00
Julien Phalip 3e65f9633b Further improved on the work done in r16622 by making the help text icons look hoverable in the admin tabular inline headers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16690 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-26 04:36:31 +00:00
Julien Phalip bf9ba45f6b Fixed #16677 -- Fixed the future version of the ssi template tag to work with template file names that contain spaces. Note that this fix cannot be applied to the currently deprecated version of the ssi tag since it requires an unquoted literal as parameter. Many thanks to Aymeric Augustin for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16687 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-25 23:02:15 +00:00
Malcolm Tredinnick bb99fe46b7 Fix test from r16678 and r16681 properly for Oracle.
Fixes #16694, with thanks to aagustin for the Oracle testing and
tweaking.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16686 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-25 09:23:49 +00:00
Julien Phalip a3fd9cf288 Fixed #15837. Consolidated all the locaflavor tests into a single, logical, place (regressiontests/localflavor/).
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16680 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-24 12:30:59 +00:00
Malcolm Tredinnick ec1226b83f Added another test to confirm fix in r16663.
This is the test case from #6045, which was fixed by the above commit.
Refs #6045, #16299

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-24 03:51:33 +00:00
Malcolm Tredinnick 75ddbf77a6 Teach "django-admin.py validate" to forbid nullable primary keys.
Fixes #15884, with thanks to JustinTArthur and Julie Pichon.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16678 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 23:43:29 +00:00
Russell Keith-Magee 8b87a94357 Corrected the setup and teardown of the refactored invalid_models test so that it guarantees that stdout is restored, and purges all the temporary models from the app cache after running the test.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16670 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 15:36:40 +00:00
Russell Keith-Magee be4acff319 Reverted r16662 -- There are bunch of problems with this patch, including failing tests, that I didn't pick up before committing.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16669 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 06:31:03 +00:00
Malcolm Tredinnick 7182cd2284 Allow "pk" as a field alias in QuerySet.only() calls.
Thanks to GDorn for the patch. Fixed #15494.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16668 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 06:29:01 +00:00
Malcolm Tredinnick a86dde20f0 Fixed a broken test from r16656.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16667 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 06:28:45 +00:00
Russell Keith-Magee a39066ba0b Fixed #16299 -- Ensure that unicode strings can be used to identify classes in ForeignKey and ManyToManyFields. Unicode strings aren't actually legal as class names, but this is an issue if you use from __future__ import unicode_literals in your models.py file. Thanks to Martijn Bastiaan for the report, and Anthony Briggs for the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16663 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 05:12:31 +00:00
Russell Keith-Magee 43024142a1 Fixed #16202 -- Added a Slovenian localflavor. Thanks to Jure Cuhalev <gandalf@owca.info>, Gasper Zejn, Domen Kozar and iElectric for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16662 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 04:41:56 +00:00
Russell Keith-Magee 1e72b1c5c1 Fixed #16681 -- Refactored the invalid_models unit test so that it can be invoked manually. Thanks to Anthony Briggs for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16661 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 04:25:07 +00:00
Russell Keith-Magee a5cbb892f8 Fixed #15315 -- Added support for the 'widget' argument to modelform_factory. Thanks to SardarNL and Will Hardy for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16659 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 04:08:24 +00:00
Russell Keith-Magee 6cd9023635 Fixed #15499 -- Ensure that cache control headers don't try to set public and private as a result of multiple calls to patch_cache_control with different arguments. Thanks to AndiDog for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16657 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 03:51:10 +00:00
Malcolm Tredinnick 2e56066a5b Fixed an isnull=False filtering edge-case. Fixes #15316.
The bulk of this patch is due to some fine analysis from Aleksandra
Sendecka.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16656 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 03:38:42 +00:00
Russell Keith-Magee 2664fa1896 Fixed #15838 -- Promoted assertFieldOutput to a general test utility. Thanks to Ramiro Morales for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16653 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 02:32:37 +00:00
Russell Keith-Magee d310f91ee7 Fixed #10571 -- Factored out the payload encoding code to make sure it is used for PUT requests. Thanks to kennu for the report, pterk for the patch, and wildfire for the review comments.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16651 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 00:52:45 +00:00
Russell Keith-Magee 0f767f9a99 Fixed #16672 -- Ensure that test classes decorated with @override_setings gets the right name when running the tests. Thanks to Julien Phalip for the report and initial patch
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16650 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-23 00:32:35 +00:00
Russell Keith-Magee 3afe409d0e Fixed #14876 -- Ensure that join promotion works correctly when there are nullable related fields. Thanks to simonpercivall for the report, oinopion and Aleksandra Sendecka for the original patch, and to Malcolm for helping me wrestle the edge cases to the ground.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16648 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-08-22 07:40:12 +00:00
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