Commit Graph

2365 Commits

Author SHA1 Message Date
Ramiro Morales 8c3416f468 Changed strategy used to force evaluation of django.utils.translation in tests added in r15508 and r15513 to not use reload(). Thanks Alex for reporting it caused problems.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15554 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-16 22:30:44 +00:00
Alex Gaynor 9ebc9108de Fix the test isolation from [15552].
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15553 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-16 15:44:13 +00:00
Jannis Leidel ada08cd6d8 Fixed #15314 -- Added tests for the static URL pattern function added in r15530 and made sure the **kwargs are passed to the view correctly. Thanks for the report and initial patch, Bruno Renié.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15552 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-16 12:50:57 +00:00
Jannis Leidel 24e0b56dcb Moved the test added in r15504 to a different case where it doesn't actually verify the existence of the URL by calling urlopen but only validates it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15551 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-16 12:50:46 +00:00
Ramiro Morales d5042109b8 Corrected small error when preserving an I18N-related setting value in an admin views test setup.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15550 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-16 03:30:27 +00:00
Jannis Leidel 0577edf610 Fixed a test case introduced in r15538 by creating a test file with non-ASCII characters dynamically.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15541 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-15 18:15:38 +00:00
Russell Keith-Magee 64b042bb3c Fixed #15247 -- Ensured that if a SingleObject view defines get_object but not get_queryset, the ModelFormMixin doesn't fail. Thanks to Sergey N. Belinsky for the report and test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15540 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-15 08:12:29 +00:00
Jannis Leidel 64a0a33c33 Fixed the staticfiles management commands collectstatic and findstatic to not raise encoding related exceptions when handlings filenames with non-ASCII characters.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15538 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-14 23:45:32 +00:00
Russell Keith-Magee bb26c328ec Fixed #15298 -- Raise a better error when a TemplateResponseMixin doesn't have a template_name defined. Thanks to rasca for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15532 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-14 13:05:14 +00:00
Russell Keith-Magee 06b22963ea Fixed #15272 -- Altered generic views to use the guaranteed untranslated object_name, rather than the possibly translated verbose_name(_plural) for default context objects. Thanks to szczav for the report and patch.
This is BACKWARDS INCOMPATIBLE for anyone relying on the default context object names for class-based Detail and List views. To migrate, either update your templates to use the new default names, or add a context_object_name argument to your generic views.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15531 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-14 13:04:51 +00:00
Jannis Leidel a26034ffbf Fixes #15270 -- Moved back the serve view to django.views.static due to dependency conflicts with the contrib app staticfiles (reverts parts of r14293). Added a helper function that generates URL patterns for serving static and media files during development. Thanks to Carl for reviewing the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15530 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-14 01:42:26 +00:00
Ramiro Morales 337b6786fd Fixed #13902 -- Fixed admin list_filter so it doesn't show duplicate results when it includes a field spec that involves m2m relationships with an intermediate model. Thanks Iván Raskovsky for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-13 22:51:40 +00:00
Ramiro Morales f6aa469b1d Fixed #13007 -- Made cookie parsing resilent to the presence of cookies with invalid characters in their names. Thanks Warlax for the report, Ubercore for his work on a fix and Jannis and Luke for review and guidance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15523 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-13 02:24:05 +00:00
Ramiro Morales a797b7dba0 Fixed #14130 -- Made manage.py error reporting more useful when the settings.py file triggers import errors (in new projects). Thanks Setok for the report, mk and steph for their work.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15522 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-13 01:56:12 +00:00
Ramiro Morales eaf17475b2 Added a test for the PendingDeprecationWarning introduced in r15441. Refs #14924, #15286.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15513 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 20:42:39 +00:00
Jannis Leidel 179fefcf7c Fixed #15286 -- Don't show deprecation warning if project locale dir is included in LOCALE_PATHS. Thanks to Claude and Ramiro.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15508 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:12:36 +00:00
Jannis Leidel 632d9f994f Fixed #15237 -- Always set charset of Atom1 feeds to UTF-8. Thanks, Simon and jasonkotenko.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15505 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:12:14 +00:00
Jannis Leidel ba1876cef2 Fixed #14941 -- Stop raising ValidationError in form fields that use the URLValidator and get a IDN domain passed. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15504 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:12:05 +00:00
Jannis Leidel bc5c2537ae Fixed #14132 -- Fixed feedgenerator to support years < 1900. Thanks, mk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15503 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:11:57 +00:00
Jannis Leidel 47b1a8e704 Fixed #12988 -- Extended regular expression of the URLValidator to fully support IDN-URLs, especially the long TLDs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15502 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:11:49 +00:00
Jannis Leidel e258d9a10b Fixed #14955 -- Made the URLValidator use a HEAD request when verifying a URL. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:11:35 +00:00
Russell Keith-Magee 492b8a0821 Fixed #13987 -- Ensure that the primary key is set correctly for all models that have concrete-abstract-concrete inheritance, not just the first model. Thanks to Aramgutang for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15498 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 15:07:27 +00:00
Russell Keith-Magee 6314a1b42e Fixed #9964 -- Ensure that all database operations make transactions dirty, not just write operations. Many thanks to Shai Berger for his work and persistence on this issue.
This is BACKWARDS INCOMPATIBLE for anyone relying on the current behavior that allows manually managed read-only transactions to be left dangling without a manual commit or rollback.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15493 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 13:03:34 +00:00
Carl Meyer 9f6d50d02e Fixed #15182 - Fixed a security issue with ClearableFileInput. Disclosure and new release forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15470 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-09 02:41:32 +00:00
Alex Gaynor 208630aa4b Fixed a security issue in the CSRF component. Disclosure and new release forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-09 02:06:27 +00:00
Russell Keith-Magee c2666c9a45 Ensure that L10N formats aren't cached between tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15461 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-09 00:09:54 +00:00
Russell Keith-Magee d3b38d578f Fixed #13815 -- Ensure that reverse exclude lookups on nullable foreign keys exclude null values. Thanks to bpeschier for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15458 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08 14:06:02 +00:00
Russell Keith-Magee 4e7c2ba1d7 Cleaned up the tests from r15451 to avoid the need to retrieve a URL twice.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15453 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08 12:20:18 +00:00
Russell Keith-Magee 74ffca17e2 Fixed #10573 -- Corrected autofocus problem in admin when the first widget displayed is a multiwidget. Thanks to rduffield for the report, and to Ramiro and Julien Phalip for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15452 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08 12:00:21 +00:00
Russell Keith-Magee a105ca5d7a Fixed #15234 -- Ensure that years in a date heirarchy don't use commas for thousand separators, regardless of the value of USE_THOUSAND_SEPARATOR. Thanks to Julien Phalip for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15451 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08 12:00:01 +00:00
Russell Keith-Magee 90a79ba39a Fixed #15175 -- Ensured that Chliean RUT checksum letters aren't case sensitive. Thanks to rvimer for the report, and to ersame for the patch.
H: Enter commit message.  Lines beginning with 'HG:' are removed.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-08 11:59:38 +00:00
Ramiro Morales f6e38f3800 Fixed #5494, #10765, #14924 -- Modified the order in which translations are read when composing the final translation to offer at runtime.
This is slightly backward-incompatible (could result in changed final translations for literals appearing multiple times in different .po files but with different translations).

Translations are now read in the following order (from lower to higher priority):

For the 'django' gettext domain:

 * Django translations
 * INSTALLED_APPS apps translations (with the ones listed first having higher priority)
 * settings/project path translations (deprecated, see below)
 * LOCALE_PATHS translations (with the ones listed first having higher priority)

For the 'djangojs' gettext domain:

 * Python modules whose names are passed to the javascript_catalog view
 * LOCALE_PATHS translations (with the ones listed first having higher priority, previously they weren't included)

Also, automatic loading of translations from the 'locale' subdir of the settings/project path is now deprecated.

Thanks to vanschelven, vbmendes and an anonymous user for reporting issues, to vanschelven, Claude Paroz and an anonymous contributor for their initial work on fixes and to Jannis  Leidel and Claude for review and discussion.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15441 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-07 18:48:40 +00:00
Russell Keith-Magee d89ad6423c Fixed #14711 -- Corrected the calculation for the previous month in generic date views. Thanks to msundstr for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15438 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-06 06:31:52 +00:00
Russell Keith-Magee 5582ad149c Fixed #14895 -- Ensure that USE_THOUSAND_SEPARATOR doesn't break the delete confirmation page. Thanks to Tuttle for the report, and Julien Phalip for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-06 06:16:03 +00:00
Ramiro Morales accee3961c Modified wrong expected ClearableFileInput rendering output in a couple of additional tests after fix introduced in [15426]. Refs #14984.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15432 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05 20:06:49 +00:00
Ramiro Morales 0b8b60caca Modified wrong expected model formset output in a couple of additional tests after fix introduced in [15424]. Refs #15167.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15430 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05 19:21:17 +00:00
Ramiro Morales f2b0f8ea0f Fixed #15226 - Made SelectDateWidget render the label tag associated with the correct dropdown sub-widget when USE_L10N is active and non-English locale is in use.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15427 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05 18:16:27 +00:00
Russell Keith-Magee b3085f8ae5 Fixed #15167 -- Ensure that non-form errors are always part of an ErrorList. Thanks to Harm Geerts for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-05 06:33:16 +00:00
Ramiro Morales 2d7049c4ee Fixed #13968 -- Fixed SelectDateWidget processing of an invalid date input value when USE_L10N is on, for consistency with its behavior when USE_L10N=False (now the form field reports the validation error in both cases). Thanks mitar for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15416 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 23:46:30 +00:00
Russell Keith-Magee d8c38bd2c9 Fixed #14046 -- Made {% include %} behave the same, regardless of whether the template included is named by variable or constant string. Thanks to defcube for the report, and George Karpenkov for the draft patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15413 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 17:10:21 +00:00
Ramiro Morales 1a2f9ff9f9 Modified a few tests methods to make sure no leaks of activated locale or USE_I10N setting value happen between tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15411 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 15:45:52 +00:00
Russell Keith-Magee 090ff64204 Fixed #15181 -- Ensure that special characters are escaped when querying for the URL of an uploaded file. Thanks to e.generalov for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15409 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 14:43:10 +00:00
Russell Keith-Magee d44fb0557a Fixed #14824 -- Corrected the handling of formats when USE_L10N is disabled. Thanks to nullie for the report and initial patch, and to idle for the separate report with helpful debug info.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15404 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-04 13:52:36 +00:00
Ramiro Morales 987fd51176 Fixed stability of data input/output L10N format modules priority order. Thanks tonnzor for the report and fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15402 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-03 15:43:50 +00:00
Ramiro Morales dc5f2607de Fixed #15029 -- Moved to database backends the ability to decide if two DATABASES items are different when creating temporary databases for tests.
hG: Enter commit message.  Lines beginning with 'HG:' are removed.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15392 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-02 14:02:14 +00:00
Carl Meyer 77030ccc1e Fixed a few test docstrings and removed an unused import in staticfiles.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15390 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 20:39:40 +00:00
Russell Keith-Magee 67a2bb6341 Modified the test case from r15383 to avoid an output inconsistency with KeyError.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15387 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 15:13:56 +00:00
Carl Meyer 7aad3d3fa8 Fixed #15094 - Added check for forgetting trailing comma in STATICFILES_DIRS tuple. Also reorganized staticfiles settings-checks for better consistency.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15386 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 14:57:10 +00:00
Russell Keith-Magee 74d485c4ec Fixed #15170 -- Skip the inspectdb test under MySQL/MyISAM, because it can't differentiate a foreign key from an integer.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15385 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 14:42:52 +00:00
Russell Keith-Magee 9a82eb6ff1 Fixed #14972 -- Ensure that the HTML email logger always produces useful output, regardless of whether it has been given an exception or a request. Thanks to jamstooks for the report, and bpeschier for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15383 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 14:18:07 +00:00