summaryrefslogtreecommitdiff
path: root/django/utils
AgeCommit message (Collapse)Author
2016-01-26Fixed #26122 -- Fixed copying a LazyObjectBen Kraft
Shallow copying of `django.utils.functional.LazyObject` or its subclasses has been broken in a couple of different ways in the past, most recently due to 35355a4.
2016-01-25Fixed #26125 -- Fixed E731 flake warnings.userimack
2016-01-23Fixed #26093 -- Allowed escape sequences extraction by gettext on Python 3Claude Paroz
Thanks Sylvain Fankhauser for the report and Tim Graham for the review.
2016-01-14Fixed #25999 -- Removed promotion of RemovedInNextVersionWarning to loud by ↵Tim Graham
default.
2016-01-13Refs #25769 -- Updated docs to reflect get_version() uses PEP 0440.Tim Graham
2016-01-11Fixed #25684 -- Made runserver use logging for request/response output.Flavio Curella
Thanks andreif for the contributing to the patch.
2016-01-06Fixed #26046 -- Fixed a crash with translations and Django-unknown language codeClaude Paroz
Thanks Jens Lundstrom for the report and Tim Graham for the review.
2016-01-05Replaced dict.setdefault() usage to avoid unnecessary object instantiations.Benjamin Bach
2016-01-05Fixed #26024 -- Fixed regression in ConditionalGetMiddleware ETag support.Denis Cornehl
Thanks Denis Cornehl for help with the patch.
2015-12-18Fixed #25915 -- Allowed language not in Django's default LANGUAGESClaude Paroz
This fixes a regression introduced by a5f6cbce07. Thanks Gavin Wahl for the report and Tim Graham for the review.
2015-12-13Fixed #25875 -- Prevented UnicodeDecodeError for Q object reprClaude Paroz
Thanks Ben Kraft for the report, and Simon Charette for the review.
2015-12-12Fixed #20223 -- Added keep_lazy() as a replacement for allow_lazy().Iacopo Spalletti
Thanks to bmispelon and uruz for the initial patch.
2015-12-03Fixed #25761 -- Added __cause__.__traceback__ to reraised exceptions.Raphaël Hertzog
When Django reraises an exception, it sets the __cause__ attribute even in Python 2, mimicking Python's 3 behavior for "raise Foo from Bar". However, Python 3 also ensures that all exceptions have a __traceback__ attribute and thus the "traceback2" Python 2 module (backport of Python 3's "traceback" module) relies on the fact that whenever you have a __cause__ attribute, the recorded exception also has a __traceback__ attribute. This is breaking testtools which is using traceback2 (see https://github.com/testing-cabal/testtools/issues/162). This commit fixes this inconsistency by ensuring that Django sets the __traceback__ attribute on any exception stored in a __cause__ attribute of a reraised exception.
2015-11-28Fixed #25812 -- Restored the ability to use custom formats with the date ↵Gagaro
template filter.
2015-11-24Fixed a settings leak possibility in the date template filter.Florian Apolloner
This is a security fix.
2015-11-19Fixed #25769 -- Updated get_version() release candidate naming for PEP 0440.Tim Graham
2015-11-18Removed redundant termcolors.Tim Graham
Replaced MIGRATE_SUCCESS and MIGRATE_FAILURE with SUCCESS and ERROR.
2015-11-17Fixed #25682 -- Removed bare except clauses.Attila Tovt
2015-11-12Fixed #25743 -- Optimized utils.localize() and localize_input()Jaap Roes
Bail early if the input is a string since that's the most common case.
2015-11-11Fixed #25720 -- Made gettext() return bytestring on Python 2 if input is ↵Marti Raudsepp
bytestring. This is consistent with the behavior of Django 1.7.x and earlier.
2015-11-10Updated six to 1.10.0.Tim Graham
2015-11-09Fixed #6727 -- Made patch_cache_control() patch an empty Cache-Control header.Dwight Gunning
2015-11-07Fixed debug view crash during autumn DST change.Aymeric Augustin
This only happens if USE_TZ = False and pytz is installed (perhaps not the most logical combination, but who am I to jugde?) Refs #23714 which essentially fixed the same problem when USE_TZ = True. Thanks Florian and Carl for insisting until I wrote a complete patch.
2015-11-07Amended comment to remove reference to the no longer used NullHandlerNeal Todd
2015-11-03Fixed #25668 -- Misc spelling errorsVille Skyttä
2015-10-26Fixed #25611 -- Standardized descriptor signatures.Tim Graham
2015-10-22Fixed #25571 -- Fixed boolean evaluation of ungettext_lazyClaude Paroz
2015-10-05Removed SimpleLazyObject workaround for a Python 3 bug.Tim Graham
The workaround added in fe8484efda257e151d9c1ca5151e546c9262bf0f seems unnecessary as the Python bug is fixed in Python 3.4.
2015-10-05Removed obsolete (since Python 2.3) __safe_for_unpickling__ attribute.Tim Graham
2015-10-03Fixed #25389 -- Fixed pickling a SimpleLazyObject wrapping a model.Ben Kraft
Pickling a `SimpleLazyObject` wrapping a model did not work correctly; in particular it did not add the `_django_version` attribute added in 42736ac8. Now it will handle this and other custom `__reduce__` methods correctly.
2015-09-29Fixed #25466 -- Added backwards compatibility aliases for LoaderOrigin and ↵Tim Graham
StringOrigin. Thanks Simon Charette for the DeprecationInstanceCheck class.
2015-09-23Removed RemovedInDjango110Warning.Tim Graham
2015-09-23Refs #23613 -- Removed django.utils.checksums per deprecation timeline.Tim Graham
2015-09-23Refs #23269 -- Removed the removetags template tag and related functions per ↵Tim Graham
deprecation timeline.
2015-09-23Refs #24526 -- Made the django logger handle INFO messages.Tim Graham
Without an explicit 'level', only messages at WARNING or higher are handled. This makes the config consistent with the docs which say, "The django catch-all logger sends all messages at the INFO level or higher to the console."
2015-09-23Fixed #25439 -- Added `SUCCESS` style to termcolor palettesMatt Deacalion Stevens
2015-09-19Refs #13110 -- Fixed mistakes in the new multiple enclosure feed testsUnai Zalakain
2015-09-18Fixed #25269 -- Allowed method_decorator() to accept a list/tuple of decorators.fabrizio ettore messina
2015-09-18Fixed #13110 -- Added support for multiple enclosures in Atom feeds.Unai Zalakain
The ``item_enclosures`` hook returns a list of ``Enclosure`` objects which is then used by the feed builder. If the feed is a RSS feed, an exception is raised as RSS feeds don't allow multiple enclosures per feed item. The ``item_enclosures`` hook defaults to an empty list or, if the ``item_enclosure_url`` hook is defined, to a list with a single ``Enclosure`` built from the ``item_enclosure_url``, ``item_enclosure_length``, and ``item_enclosure_mime_type`` hooks.
2015-09-16Fixed #24496 -- Added CSRF Referer checking against CSRF_COOKIE_DOMAIN.Matt Robenolt
Thanks Seth Gottlieb for help with the documentation and Carl Meyer and Joshua Kehn for reviews.
2015-09-07Fixed #24917 -- Made admindocs display model methods that take arguments.Zan Anderle
2015-09-04Fixed #25297 -- Allowed makemessages to work with {% trans %} tags that use ↵Alexandre Pocquet
template filters.
2015-09-04Refs #25345 -- Updated links to code.google.com.Maxime Lorant
2015-08-31Fixed #25331 -- Removed trailing blank lines in docstrings.Maxime Lorant
2015-08-29Made the autoreloader survive all exceptions.Aymeric Augustin
Refs #24704.
2015-08-29Fixed #24704 -- Made the autoreloader survive SyntaxErrors.Aymeric Augustin
With this change, it's expected to survive anything except errors that make it impossible to import the settings. It's too complex to fallback to a sensible behavior with a broken settings module. Harcoding things about runserver in ManagementUtility.execute is atrocious but it's the only way out of the chicken'n'egg problem: the current implementation of the autoreloader primarily watches imported Python modules -- and then a few other things that were bolted on top of this design -- but we want it to kick in even if the project contains import-time errors and django.setup() fails. At some point we should throw away this code and replace it by an off-the-shelf autoreloader that watches the working directory and re-runs `django-admin runserver` whenever something changes.
2015-08-29Ensured gen_filenames() yields native strings.Aymeric Augustin
This also fixes a test failure on Python 2 when Django is installed in a non-ASCII path. This problem cannot happen on Python 3.
2015-08-29Accounted for error files in the autoreloader.Aymeric Augustin
* When some old files contain errors, the second call to gen_filenames() should return them. * When some new files contain errors, the first call to gen_filenames(only_new=True) should return them.
2015-08-25Fixed #25295 -- Restored 'no active translation' after language overrideClaude Paroz
Thanks David Nelson Adamec for the report and Tim Graham for the review.
2015-08-15Fixed #24935 -- Refactored common conditional GET handling.Denis Cornehl