Commit Graph

536 Commits

Author SHA1 Message Date
Jannis Leidel fc8116cc4f Fixed #6580 -- Added `default` parameter to `MultiValueDict.getlist` method (the base class for `QueryDict`). Many thanks to mk and andrewebdev.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16260 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-22 15:05:29 +00:00
Jannis Leidel f60d428463 Fixed #12417 -- Added signing functionality, including signing cookies. Many thanks to Simon, Stephan, Paul and everyone else involved.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16253 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-21 14:41:14 +00:00
Jannis Leidel 5e39ada245 Added missing callables to django.utils.translation.__all__ (`override` and `ugettext_noop`). Many thanks to Ramiro for the hint.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16211 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-10 18:49:04 +00:00
Jannis Leidel 71ec87fed8 Added django.utils.translation.override context manager to easily activate and deactivate a language for a code block.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16166 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-06 13:29:32 +00:00
Luke Plant 23b32c7554 Fixed #15811 - lazy() doesn't take into account methods defined in parents
Thanks to abki for the report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-05 00:09:51 +00:00
Jannis Leidel 0b1a061881 Replaced old-style with new-style decorator syntax.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-01 16:46:02 +00:00
Jannis Leidel da3aa22d04 Fixed #5714 -- Strip whitespaces around date and time form field values before converting it to a native type. Thanks to SmileyChris for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16137 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-05-01 16:14:57 +00:00
Luke Plant cf11e3789b Fixed #7267 - UnicodeDecodeError in clean_html
Thanks to Nikolay for the report, and gav and aaugustin for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@16118 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-28 14:08:53 +00:00
Jannis Leidel 0e5d5d6218 Fixed #15662 -- Made sure the module_has_submodule utility function follow correct PEP 302, passing the package as the second argument to the find_module method of the importer. Thanks, Bradley Ayers.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16075 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:03:18 +00:00
Jannis Leidel 01d0bf011e Fixed #13810 -- Truncate numbers correctly when given number of decimal positions is zero. Thanks, milosu and Łukasz Rekucki.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16074 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:03:10 +00:00
Jannis Leidel f4be8bd53d Fixed #9089 -- Correctly handle list values in MultiValueDict instances when passed to django.utils.http.urlencode. Thanks, kratorius, guettli and obeattie.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16064 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-22 12:01:41 +00:00
Ramiro Morales 0defa7dc9d Fixed #15848 -- Fixed regression introduced in [15882] in makemessages management command when processing multi-line comments that contain non-ASCCI characters in templates. Thanks for the report Denis Drescher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16038 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-18 20:00:10 +00:00
Adrian Holovaty eaf5554865 Fixed grammar error in utils/functional.py from [15940]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@16005 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 21:45:56 +00:00
Russell Keith-Magee d60ae0b721 Removed deprecated 'no' translation
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15988 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:43:43 +00:00
Russell Keith-Magee 86ba75b090 Advanced deprecations in django.utils.translation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15987 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-02 08:41:51 +00:00
Adrian Holovaty 94af19c43f Changed e-mail to email throughout documentation and codebase. The one exception is translation strings, which I didn't want to disrupt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15967 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-04-01 16:10:22 +00:00
Jannis Leidel 7099d465ab Fixed #15724 -- Added update_wrapper import to utils.functional to be a bit more forgiving for 3rd party apps using that import.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15965 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-31 08:42:51 +00:00
Jannis Leidel 37ed6f2681 Re-added a few compatibility modules that were removed in r15927 to lower the impact on 3rd party apps.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15944 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-30 08:34:05 +00:00
Alex Gaynor cc3803e147 Remove a license that no long applies to any code, and add a comment for the next person who wants to do some gardening.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15940 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 21:27:22 +00:00
Adrian Holovaty b4f0c1a775 Removed a Python 2.4 try/except no longer necessary in django.utils.translation.trans_real
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15934 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:31:31 +00:00
Adrian Holovaty 7cac1ecbd0 Simplified django.utils.feedgenerator.get_tag_uri now that we don't require Python 2.4
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15930 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:25:26 +00:00
Adrian Holovaty 13864703bc Removed a bunch more Python 2.4 workarounds now that we don't support that version. Refs #15702 -- thanks to jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15927 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-28 02:11:19 +00:00
Adrian Holovaty 3e18969bcb Fixed #15635 -- Converted two legacy old-style raise statements. Thanks, DaNmarner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15917 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-26 03:30:48 +00:00
Karen Tracey 3e7ce3c750 Ensure stdin is a tty before handing it to termios, so as to prevent prolems when running under IDEs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15911 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-24 12:36:33 +00:00
Karen Tracey f5b22ed997 Fixed #15565: Ensure terminal echo is on after reloader reloads (something turns it off on some systems if reload happens while at a pdb prompt). Thanks for the report zimnyx.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15883 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-19 22:09:38 +00:00
Ramiro Morales 775a6e694f Fixed #15632 -- Ignore unrelated content in template multi-line comment blocks when looking for tokens that identify comments for translators. Thanks andrew AT ie-grad DOT ru for the report and Claude Paroz for spotting the problem and helping to fix it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15882 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-19 12:56:38 +00:00
Russell Keith-Magee 7ab5ce6cf1 Fixed #15628 -- Made the admin error email more useful when there isn't a request associated with the message. Thanks to hynek for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-17 10:33:08 +00:00
Adrian Holovaty 304a50d8ca Fixed #15603 -- Changed the traceback error e-mails not to use HTML by default. It's now configurable with an 'include_html' parameter to AdminEmailHandler. Thanks, kmtracey
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15850 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-16 04:13:57 +00:00
Luke Plant 243d0bec19 Fixed #15617 - CSRF referer checking too strict
Thanks to adam for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15840 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-15 20:37:09 +00:00
Adrian Holovaty 4e25bc71b1 Fixed #15609 -- Fixed some 'raise' statements to use the newer style syntax. Thanks, DaNmarner
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15811 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-14 23:00:03 +00:00
Ramiro Morales d50f59ee18 Fixed #15543 -- Tweaked change from r15696 to not use 'if' syntax introduce in Python 2.5. Thanks to an anonymous reporter for the heads up.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15731 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 18:42:59 +00:00
Russell Keith-Magee afd040d4d3 Updated test assertions that have been deprecated by the move to unittest2. In summary, this means:
assert_ -> assertTrue
 assertEquals -> assertEqual
 failUnless -> assertTrue

For full details, see http://www.voidspace.org.uk/python/articles/unittest2.shtml#deprecations

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15728 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-03 15:04:39 +00:00
Jannis Leidel f6c991667f Fixed #4992 -- Respect the GET request query string when creating cache keys. Thanks PeterKz and guettli for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15705 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-02 12:47:36 +00:00
Luke Plant dbe6ced0d6 Fixed #717 - If-Modified-Since handling should compare dates according to RFC 2616
Thanks to Maniac for the report, julienb for the initial patch, and
especially to aaugustin for the final patch and tests.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15696 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-03-01 14:28:06 +00:00
Jannis Leidel ae10b2772b Fixed #15369 -- Added missing import in _os module. Thanks, jonash.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-21 14:16:29 +00:00
Jannis Leidel 6b1191b1a2 Normalize the locale paths when considering merging a project language catalogue. Refs #14924.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15529 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-14 01:42:12 +00:00
Ramiro Morales ee06020240 Don't merge in translations twice from deprecated project level tree when it is also listed in LOCALE_PATHS. Thanks Claude Paroz. Refs #14924.
Also, removed some old unused variables as reported by pyflakes.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@15514 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 22:38:23 +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 e1e3f24371 Fixed #14461 -- Look also in LOCALE_PATHS when checking if a language is supported. Thanks to Diego Búrigo for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15507 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-12 19:12:28 +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 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
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 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
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
Carl Meyer 00fda7f45d Fixed #13283 -- Corrected CACHE_MIDDLEWARE_ANONYMOUS_ONLY's bad habit of setting Vary: Cookie on all responses and destroying cache efficiency. Thanks to natrius for the fix.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15381 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-02-01 00:20:31 +00:00
Russell Keith-Magee 56ebab9d85 Fixed #14698 -- Ensure that module_has_sumodule doesn't mistake a cache miss for an existent package. Thanks to Łukasz Rekucki for the report and patch, and to shields for the test case.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15362 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-30 13:10:47 +00:00
Russell Keith-Magee d053624aa8 Fixed #15067 -- Modified the range checks on base36_to_int so you are guaranteed to always get an int, avoiding possible OverflowErrors. Thanks to Garthex for the report, jboutros for the patch, and kfrazier for the feedback.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15288 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-24 08:02:40 +00:00
Jannis Leidel 07b92cd489 Fixed #9988 (again) -- Updated list of Associated Press months names to use a translation context. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15280 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-21 22:25:50 +00:00
Russell Keith-Magee 3a9e2e90ac Fixed #13062 -- Ensure that runserver exposes all warnings requested at the command line. Thanks to gremmie for the report, and claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-17 13:15:08 +00:00
Alex Gaynor fcbf881d82 Refactor all uses of thread locals to be more consistant and sane.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15232 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-17 09:52:47 +00:00
Ramiro Morales fd12e3b218 Fixed #15024 -- Ensure that choice of L10N format module used is stable given a stable setup of format modules in ll/ and ll_CC/ dirs. Thanks David Reynolds for the report and suggestions leading to the solution.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15183 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-13 03:02:32 +00:00
Russell Keith-Magee 2a5105ac15 Fixed #14973 -- Tweaked the email log handler so that the log message is actually reported.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15132 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-03 12:07:19 +00:00
Ramiro Morales 0f783b7f4e Fixed #2986 -- Made the JavaScript code that drives related model instance addition in a popup window handle a model representation containing new lines. Also, moved the escapejs functionality yoo django.utils.html so it can be used from Python code. Thanks andrewwatts for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15131 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-01-02 17:34:52 +00:00
Jannis Leidel d18d37ce29 Added our own rmtree error handler to make sure we can delete correctly delete .svn directories when running the tests on Windows which are read-only for some reason.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15120 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-31 14:22:55 +00:00
Ramiro Morales 8219a13092 Fixed #10447 -- Made sure the syndication feeds helper function that returns RFC 2822-formatted datetime strings isn't affected by the current locale, removing use of strftime() because the '%a' and '%b' format specifiers are problematic in this respect. Thanks bear330 for the report and lupus for an initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15112 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-29 21:23:21 +00:00
Alex Gaynor 6819be1ea1 Fix a security issue in the auth system. Disclosure and new release forthcoming.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15032 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-23 03:45:08 +00:00
Russell Keith-Magee b22415214a Beefed up the tests for multi-cache handling of the cache middleware and view decorators, and made a couple of tweaks for edge cases as a result.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@15021 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-22 07:52:44 +00:00
Jannis Leidel 7292af8542 Fixed #14570 -- Added new date format character for alternative month names using the new context capabilities. Also add context to Associated Press style month names (refs #9988). Thanks to Claude and shell_dweller.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-13 13:51:28 +00:00
Jannis Leidel 9ab85e05e2 Fixed #4030 -- Added ability to translate language names. Thanks to Antti Kaihola and Ramiro Morales for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14894 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 23:02:45 +00:00
Jannis Leidel dad28e8557 Fixed #14103 -- Take USE_ETAGS setting into account when patching the response headers. Thanks, trbs and Eric Holscher.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14885 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:57:17 +00:00
Jannis Leidel 462d3115a3 Fixed #5672 -- Allow the separator in the get_text_list utility function to be translated. Thanks, Claude.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-12 22:53:49 +00:00
Jannis Leidel 5fadc86200 Fixed #14851 -- Swapped an argument order to fix compatibility with Python<2.6. Thanks for report and patch, mk.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14845 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-06 21:54:49 +00:00
Russell Keith-Magee 29c4a578af Fixed #10863 -- Added HTML support to mail_managers() and mail_admins(), and used this to provide more and prettier detail in error emails. Thanks to boxed for the suggestion, and to Rob Hudson and Brodie Rao for their work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14844 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-06 14:21:51 +00:00
Ramiro Morales 23f69af454 Fixed #12201 -- Added a lineno attibute to template Token so e.g. we can report line numbers in errors during i18n literals extraction. Thanks madewulf for the report and Claude Paroz for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14813 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 17:42:54 +00:00
Russell Keith-Magee ac91d5ef08 Fixed #14807 -- Ensure that boolean values aren't localized as T.rue and Fa.lse because of the thousand separator. Thanks to vanschelven for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14804 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-12-04 07:44:00 +00:00
Chris Beaven aff9ff9bf5 Fixes #14715 -- More informative ValueError for safe_join util. Thanks btubbs.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14699 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-26 02:28:07 +00:00
Russell Keith-Magee 591ad8afbf Fixed #14512 -- Added documentation on how to apply decorators to class-based generic views. Thanks to Łukasz Rekucki for his work on the issue.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-20 05:10:13 +00:00
Jannis Leidel 17b329ae08 Fixed #10004 and #12320 -- Enabled the makemessages management command to collect comments for translators that start with the "Translators" keyword. Thanks for the report and patches, martinb and Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14595 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-17 15:37:33 +00:00
Ramiro Morales b6ec268e23 Fiexed #3055 -- Validate that models target of a GenericRelation have a GenericForeignKey field.
Thanks jason for diagnosing the problem and Marcos Moyano for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14563 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-14 23:21:39 +00:00
Jannis Leidel 127506aeac Fixed #11966 -- Made it possible to use a percent sign in a translation message id. Thanks for the patch, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14459 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 14:06:24 +00:00
Jannis Leidel 83aeb3c768 Fixed #9988 -- Added support for translation contexts. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14450 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-11-04 10:48:27 +00:00
Russell Keith-Magee ccc49029b8 Fixed #14181 -- Added a template tag and filters to allow localization to be disabled in a template. Thanks to Benjamin Wohlwend for the work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14395 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 16:48:58 +00:00
Honza Král cb17f7ca22 Fixed #14560 -- Enable HEAD requests to be cached properly. Thanks, codemonkey!
Introducing ability to cache HEAD requests and GET requests separately by
adding the method to the cache key while preserving the functionality that HEAD
requests can use cached reponses generated by a GET request.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14391 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-29 01:31:15 +00:00
Alex Gaynor c6f90f0053 Fixed MultiValueDict's copy implementation to be consistant with all other copies.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14366 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-27 20:39:20 +00:00
Luke Plant 5864834fa5 Fixed a bug with method_decorator not preserving the attributes of the wrapped method, which is important for decorators like csrf_exempt
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14311 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-21 14:56:49 +00:00
Russell Keith-Magee f657079c70 Fixed #14486 -- Modified the import order for the bundled unittest so that a locally installed unittest2 (which will have more features) will supersede the Python 2.7 native version. Thanks to Michael Foord for the suggestion.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14259 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-18 16:01:11 +00:00
Luke Plant d81b3aa739 Fixed Python 2.4 incompatibility introduced in [14218]
sha_constructor was incorrectly used instead of sha_hmac (which only made a
difference under 2.4).

Thanks to Steffan Kaminski for report and patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14233 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-15 11:11:08 +00:00
Luke Plant 45c7f427ce Fixed #14445 - Use HMAC and constant-time comparison functions where needed.
All adhoc MAC applications have been updated to use HMAC, using SHA1 to
generate unique keys for each application based on the SECRET_KEY, which is
common practice for this situation. In all cases, backwards compatibility
with existing hashes has been maintained, aiming to phase this out as per
the normal deprecation process. In this way, under most normal
circumstances the old hashes will have expired (e.g. by session expiration
etc.) before they become invalid.

In the case of the messages framework and the cookie backend, which was
already using HMAC, there is the possibility of a backwards incompatibility
if the SECRET_KEY is shorter than the default 50 bytes, but the low
likelihood and low impact meant compatibility code was not worth it.

All known instances where tokens/hashes were compared using simple string
equality, which could potentially open timing based attacks, have also been
fixed using a constant-time comparison function.

There are no known practical attacks against the existing implementations,
so these security improvements will not be backported.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14218 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-14 20:54:30 +00:00
Russell Keith-Magee 121d2e3678 Fixed #12991 -- Added unittest2 support. Thanks to PaulM for the draft patch, and to Luke, Karen, Justin, Alex, Łukasz Rekucki, and Chuck Harmston for their help testing and reviewing the final patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14139 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:55:17 +00:00
Russell Keith-Magee 1070c57b83 Fixed #14436 -- Escalated 1.2 PendingDeprecationWarnings to DeprecationWarnings, and removed 1.1 deprecated code.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14138 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-11 12:20:07 +00:00
Russell Keith-Magee a904e55859 Fixed #11509 -- Modified usage of "Web" to match our style guide in various documentation, comments and code. Thanks to timo and Simon Meers for the work on the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@14069 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-09 08:12:50 +00:00
Russell Keith-Magee fea159282b Fixed #14406 -- Added a Python 2.4 compatibility to the logging interface. Thanks to Łukasz Rekucki for the report, and to Luke Plant for original patch this was based on.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13989 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-06 15:02:26 +00:00
Russell Keith-Magee 24acca4139 Fixed #12012 -- Added support for logging. Thanks to Vinay Sajip for his draft patch, and to the many people who gave feedback during development of the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13981 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-10-04 15:12:39 +00:00
Jannis Leidel d80d2e8103 Fixed #14053 -- Also localize long integers. Thanks, David Danier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13920 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 16:21:16 +00:00
Jannis Leidel bf8c93f2cf Fixed #14306 -- Cleaned up django.utils.translation module a bit to be quicker. Thanks for the report and initial patch, Anssi Kääriäinen.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13899 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:25:38 +00:00
Jannis Leidel 534792d055 Fixed #14290 -- Made format localization faster by caching the format modules. Thanks, Teemu Kurppa and Anssi Kääriäinen for the report and initial patches.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-27 15:25:08 +00:00
Luke Plant 6fb4f6e299 Fixed #13765 - 'safe' parameter for urlencode filter
Thanks to KyleMac for the suggestion and SmileyChris for the patch

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13849 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-13 23:01:34 +00:00
Jannis Leidel 7bb6abed12 Fixed #13702 -- Made sure to actually fall back to the l10n format strings provided in the settings, when disabled.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13770 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-12 19:40:44 +00:00
Justin Bronn 1efa807703 Fixed #12632 -- Improved performance of `SortedDict`. Thanks, Alex Gaynor.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13742 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-11 02:28:16 +00:00
Malcolm Tredinnick 255147c97e Added more readable __str__ and __repr__ methods to MergeDict.
Thanks, john@calixto.net. Fixed #3508.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13721 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-09-10 19:24:24 +00:00
Russell Keith-Magee 806f3b26f8 Fixed #11021 -- Clarified newline stripping behavior in the truncatewords and truncatewords_html filters. Thanks to Ben Spaulding for the report and patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-07 14:57:24 +00:00
Russell Keith-Magee c4b6edf3b8 Fixed #12746 -- Updated sorting calls to use 'key' instead of 'cmp'. This will be slightly faster in certain circumstances, but more importantly, is a required step for migration to Python 3. Thanks to Martin van Loewis for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13509 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-08-06 16:31:44 +00:00
Karen Tracey adc9458541 Fixed #13653: Fixed django.utils.hashcompat to support running on Python 2.4 with standalone hashlib.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13310 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-28 11:46:03 +00:00
Jannis Leidel 34ddcd9939 Fixed #13547 -- Made sure the ISO 8601 date formatting introduced in r12058 uses "T" as the separator between the date and the time value to increase real world usefulness.
While the ISO standard permits the use of a space instead of "T" for readability, it does have an impact on standards like HTML5 which rely on specific rules made in RFC 3339.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13266 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-16 15:54:10 +00:00
Luke Plant b29b0f8cac Corrected 'name' of functions wrapped with method_decorator
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13249 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-13 11:11:27 +00:00
Brian Rosner 47639b6410 Fixed #3469 -- added django.utils documentation for stable bits
Thanks to Rupe and Ramiro Morales for their initial work on this patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@13140 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-08 21:38:27 +00:00
Russell Keith-Magee 5211f48ae3 Fixed #12164 -- Removed the Python 2.3 compatibility imports and workarounds. Thanks to timo and claudep for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13094 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04 14:00:30 +00:00
Russell Keith-Magee 4ca7c4e34d Fixed #13464 -- Reworked module_has_submodule to break the requirement for loader and finder to be the same class. Thanks to Alex Gaynor for the report and patch, and Brett Cannon for suggesting the approach.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@13082 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2010-05-04 06:14:47 +00:00