Commit Graph

1058 Commits

Author SHA1 Message Date
LarryBrid 1bb1d3168b Updated urlize regex following a93ee5112d
Prevent urlize from turning some.organization, an.intern etc.
into urls. Refs #22941.
2014-07-04 09:00:16 +02:00
LarryBrid a93ee5112d Fixed #22941 - Added support for domain-only links with chars after the TLD to urlize.
It now works with something like google.com/foo/bar
2014-07-02 20:36:53 -04:00
Curtis 71461b14ab Fixed #22691 -- Added aliasing to cached_property. 2014-07-01 06:32:53 -04:00
Tim Graham 5e9773269a Added newline to fix flake8 error. 2014-06-26 15:16:23 -04:00
Claude Paroz 0d363b25b8 Fixed #22857 -- Reset translations when only .mo file changed
No need to restart the server when a translation file changes.
Refs #9523. Thanks artscoop for the report and Tim Graham for
the review.
2014-06-26 10:01:52 +02:00
Claude Paroz 18b3788401 Cleaned temp dir in symlinks_supported()
Refs #21482.
2014-06-23 13:27:52 +02:00
Claude Paroz 9618d68b34 Fixed #8033 -- Explained app registry error during translation setup
Thanks Tim Graham and Aymeric Augustin for the review.
2014-06-23 09:31:45 +02:00
Loic Bistuer f07735c619 Fixed #22867 -- Memoized django.utils.version.get_git_changeset().
This follows commits 80f4487 and 01399fa; original patch had to be
reverted because it wasn't Python 2.6 compatible and we need it to
be in order to build docs on the djangoproject.com server.

This fix should be replaced by @lru_cache as soon as we drop
Python 2.6 compatibility.

Thanks Florian Apolloner for the review and Alexander Schepanovski
for the original patch.
2014-06-23 00:03:58 +07:00
Aymeric Augustin 01399fa0aa Revert "Fixed #22867 -- Memoized django.utils.version.get_git_changeset()."
This reverts commit 80f4487 temporarily, because that commit prevented
the djangoproject.com server from building the docs, because it still
uses Python 2.6.
2014-06-19 18:11:25 +02:00
Alexander Schepanovski 80f4487d17 Fixed #22867 -- Memoized django.utils.version.get_git_changeset().
This improves pickling speed in prelease versions of Django; refs #21430.
2014-06-19 10:46:04 -04:00
Andrew Godwin d359647715 Fixed #21498: Don't use a fallback language if you're en-us. 2014-06-16 20:40:13 -07:00
Shai Berger 06c0e740a4 Added django.utils.six.buffer_types
and used it in the Oracle SchemaEditor. Refs #22715.
2014-06-13 13:09:51 -04:00
Richard Eames 7beaeeed2b Fixed #22814 -- Allowed ISO-8601 [+-]hh timezone format in parse_datetime 2014-06-12 10:58:50 -06:00
Anubhav Joshi 42736ac8e8 Fixed #21430 -- Added a RuntimeWarning when unpickling Models and QuerySets from a different Django version.
Thanks FunkyBob for the suggestion, prasoon2211 for the initial patch,
and akaariai, loic, and charettes for helping in shaping the patch.
2014-06-11 10:03:34 -04:00
Alex Gaynor d8f6b55aa8 Optimize is_protected_type slightly (used by force_text, which is used basically everywhere) 2014-06-07 20:36:59 -07:00
Aymeric Augustin 5836a5771f Fixed #20815 -- Don't enforce unbuffered I/O on Python 3.
No test because this code is already deprecated (part of FastCGI support).
2014-06-07 22:33:56 +02:00
Aymeric Augustin d7f1f316bc Simplified module_has_submodule on Python >= 3.3.
Stopped using the imp module on Python >= 3.3. Refs #21628.
2014-06-07 22:02:05 +02:00
Aymeric Augustin d98cc41a84 Made a test compatible with Python 2 and 3. 2014-06-07 15:04:06 +02:00
Claude Paroz daaeb84158 Fixed #22773 -- Forced templatize() to return unicode 2014-06-06 08:42:52 +02:00
Alexandr Shurigin 083d285b82 Fixed #22681 -- Made TarArchive recognize leading directories properly. 2014-06-03 12:00:33 -04:00
Alex Gaynor 875ce287e2 Note that the stdlib's version of pbkdf2_hmac will also be used in the upcoming Python 2.7.8 release 2014-05-31 13:50:07 -07:00
Alex Gaynor 1dcc603eff Fixed several typos in Django 2014-05-28 17:39:14 -07:00
Florian Apolloner 7e3cf3cfd2 Fixed constant_time_compare on Python 2.7.7
Python 2.7.7 includes compare_digest in the hmac module, but it requires
both arguments to have the same type. This is usually not a problem on
Python 3 since everything is text, but we have mixed unicode and str on
Python 2 -- hence make sure everything is bytes before feeding it into
compare_digest.
2014-05-28 19:51:39 +02:00
Claude Paroz 2779c299c8 Removed code deprecated from Django 1.2 2014-05-25 21:25:23 +02:00
Claude Paroz dbb48d2bb9 Applied unicode_literals to makemessages command
This also fixes #22686 as some sort of side-effect.
2014-05-24 11:51:57 +02:00
Martin Brochhaus bb0a9a070b Fixed #20477: Allowed list of modules for FORMAT_MODULE_PATH
Previously the FORMAT_MODULE_PATH setting only accepted one string (dotted
module path). A feature has been added to also allow a list of strings.

This is useful when using several reusable third party apps that define new
formats. We can now use them all and we can even override some of the formats
by providing a project-wide format module.
2014-05-21 07:35:47 -04:00
Tim Graham 5abc811a40 Revert "Fixed #20477: Allowed settings.FORMAT_MODULE_PATH to be a list of modules."
This reverts commit 950b6de16a.
2014-05-19 08:22:46 -04:00
Martin Brochhaus 950b6de16a Fixed #20477: Allowed settings.FORMAT_MODULE_PATH to be a list of modules.
Previously the FORMAT_MODULE_PATH setting only accepted one string (dotted
module path).

This is useful when using several reusable third party apps that define new
formats. We can now use them all and we can even override some of the formats
by providing a project-wide format module.
2014-05-19 07:59:13 -04:00
Markus Amalthea Magnuson acb20016c0 Fixed #6668 -- Optimized utils.text wrap function
This fixes a failing test after applying an optimization of the
utils.text.wrap function by user SmileyChris.
2014-05-17 20:42:58 +02:00
Alex Gaynor b6b873d2ad Fixed several flake8 errors, including one where a test wouldn't be run 2014-05-17 09:54:34 -07:00
Aymeric Augustin 1109ebd7b3 Optimized make_aware/naive by removing redundant checks. Refs #22625.
Also added tests with pytz and removed misplaced tests.
2014-05-16 23:12:59 +02:00
Aymeric Augustin fa89acf1d0 Fixed #22625 -- Normalized make_aware/naive errors.
Also added tests for is/make_aware/naive.

Thanks Tom Michaelis for the report.
2014-05-16 22:52:10 +02:00
Moayad Mardini 393ddc10a7 Fixed #22531 -- Added tree.Node.__repr__ and tests for the class.
While Node class has a useful `__str__`, its `__repr__` is not that
useful. Added a `__repr__` that makes use of the current `__str__`.
This is especially useful since the more popular `Q` class inherits
`tree.Node`. Also created new tests that cover most of `Node` class
functionality.
2014-05-16 09:30:25 -04:00
Collin Anderson 8a2f04db91 typo: urlaprse -> urlparse 2014-05-14 15:00:57 -04:00
Erik Romijn 255449c1ee Added additional checks in is_safe_url to account for flexible parsing.
This is a security fix. Disclosure following shortly.
2014-05-14 10:19:48 +02:00
Tim Graham 4492ea5475 Fixed #22586 -- Added LANGUAGE_SESSION_KEY to __all__.
Thanks david.fischer.ch at gmail.com for the report.
2014-05-06 19:47:22 -04:00
Claude Paroz 142c27218a Fixed #22565 -- Prevented pgettext_lazy crash with bytestring input
Thanks ygbo for the report.
2014-05-02 19:33:22 +02:00
Tim Graham 45c2d1f5d9 flake8 fixes. 2014-04-30 18:33:46 -04:00
Doug Beck a5f6cbce07 Refactored DjangoTranslation class
Also fixes #18192 and #21055.
2014-04-30 18:36:25 +02:00
Simon Charette a2340ac6d6 Use the new implementation of `six.with_metaclass`.
No more `NewBase` horrors.

Thanks to bendavis78 for his work on merging this into six.
2014-04-29 09:43:08 -04:00
Alex Gaynor 2bcb8bfc8d Fix many many typos in comments throughout the codebase 2014-04-26 10:18:45 -07:00
Alex Gaynor 58176dee88 Use the stdlib's compare_digest for constant time comparisons when available 2014-04-22 14:45:00 -07:00
Aymeric Augustin 428c0bbe1b Appeased flake8 2.1.0. 2014-04-21 12:27:34 +02:00
Alex Gaynor 21a1fddcc4 Typo fix 2014-04-17 11:04:57 -07:00
Alex Gaynor cb68eb3e6d Use the stdlib's PBKDF2 implementation when available.
This is a bit faster than ours, which is good, because it lets you increase
the iteration counts.

This will be used on Python 3.4+, and, pending the acceptance of PEP466, on
newer Python 2.7s.
2014-04-17 11:02:42 -07:00
Tomasz Wysocki c28beb4291 Refactored and commented strip_tags utility 2014-04-03 21:24:29 +02:00
Alex Gaynor 608e6eb295 Added an explanatory comment. Refs #22017 2014-04-02 09:47:18 -07:00
Alex Gaynor 666990a2a0 Revert "Merge pull request #2508 from tomwys/patch-1"
This reverts commit c45607e939, reversing
changes made to 9769337ca8.
2014-04-02 09:45:42 -07:00
Alex Gaynor 66cbd81456 Merge pull request #2509 from tomwys/patch-2
Refactor. Stop using memory for list copies.
2014-04-02 08:35:42 -07:00
Tomasz Wysocki cb9704fc4f Refactor. Stop using memory for list copies. 2014-04-02 17:32:51 +02:00