Commit Graph

799 Commits

Author SHA1 Message Date
Alex Gaynor b865009d41 Fixed #12397 -- allow safe_join to work with the root file system path, which means you can have your root template or file upload path at this location. You almost certainly don't want to do this, except in *very* limited sandboxed situations. 2012-09-07 16:49:22 -04:00
Alex Gaynor 292322f977 [py3k] Silence many warnings while running the tests. 2012-09-07 13:17:34 -04:00
Claude Paroz cc9b767fc6 Fixed #18902 -- Made force_bytes properly handle exception input
Thanks Aymeric Augustin for the report and the initial patch.
2012-09-04 09:27:28 +02:00
Claude Paroz ae88e73fa6 Replaced some smart_xxx by force_xxx equivalent
smart_str/smart_text should only be used when a potential lazy
string should be preserved in the result of the function call.
2012-08-30 15:46:16 +02:00
Claude Paroz ebc773ada3 Replaced many smart_bytes by force_bytes
In all those occurrences, we didn't care about preserving the
lazy status of the strings, but we really wanted to obtain a
real bytestring.
2012-08-29 11:20:32 +02:00
Aymeric Augustin 20012b961e [py3] Updated bundled version of six 2012-08-28 23:20:55 +02:00
Aymeric Augustin 03671ad7e3 Reordered imports
to avoid an error introduced in 5301a9d7b1.
2012-08-23 10:24:50 +02:00
Aymeric Augustin 5301a9d7b1 [py3] Removed duplicate imports.
Fixed #18837. Refs #18791.
2012-08-23 10:16:16 +02:00
Claude Paroz ab2f65bb7f Removed obsolete __members__ definitions
This was useful for pre-Python 2.6 support. See commit c6e8e5d9.
2012-08-21 11:20:22 +02:00
Aymeric Augustin e89bc39935 Reverted type check added in 62954ba04c.
Refs #17040.
2012-08-21 09:00:55 +02:00
Aymeric Augustin 62954ba04c [py3] Fixed #17040 -- ported django.utils.crypto.constant_time_compare.
This is a private API; adding a type check is acceptable.
2012-08-20 22:50:49 +02:00
Aymeric Augustin 2f59e94a41 Fixed #18728 -- Made colon optional in tzinfo
Made two-digit hours and minutes mandatory in tzinfo (the code used
to crash if a one-digit representation was provided).

Added standalone tests for django.utils.dateparse.
2012-08-19 21:47:41 +02:00
Aymeric Augustin a43ecc0444 Removed an inaccurate statement
in docstrings of dateparse functions.
2012-08-19 21:25:41 +02:00
Aymeric Augustin afc1bd7ab8 [py3] Made 212b9826bd Python 3-friendly 2012-08-18 17:51:16 +02:00
Aymeric Augustin a120fac65a Introduced force_bytes and force_str.
This is consistent with the smart_* series of functions and it's going
to be used by the next commit.
2012-08-18 16:38:49 +02:00
Marc Tamlyn 212b9826bd Fixed #14516 -- Extract methods from removetags and slugify template filters
Patch by @jphalip updated to apply, documentation and release notes
added.

I've documented strip_tags as well as remove_tags as the difference
between the two wouldn't be immediately obvious.
2012-08-18 15:07:21 +01:00
Aymeric Augustin 547b181046 [py3] Ported django.utils.safestring.
Backwards compatibility aliases were created under Python 2.
2012-08-18 16:04:06 +02:00
Aymeric Augustin 85e7a5e140 [py3] Stopped attempting to translate bytes.
That goes actively against the goal of cleaning string handling.
2012-08-18 11:36:09 +02:00
Aymeric Augustin 4c1286cf78 [py3] Added compatibility import of thread/_thread
This commit fixes the auto-reload of the development server.

I should have done that change in ca07fda2.
2012-08-18 10:56:56 +02:00
Claude Paroz 5c79dd5865 Fixed #18239 -- Subclassed HTMLParser only for selected Python versions
Only Python versions affected by http://bugs.python.org/issue670664
should patch HTMLParser.
Thanks Raphaël Hertzog for the initial patch (for 1.4).
2012-08-16 21:03:11 +02:00
Ramiro Morales 62c3f6362a Fix changes introduced in fd04e7 so they don't break on Python 3. 2012-08-15 23:08:16 -03:00
Adrian Holovaty fd04e711d2 Added import of force_unicode to utils/text.py
For backwards compatibility with stupid people like me. Refs #18772.
2012-08-15 16:59:31 -05:00
Alex Gaynor ea1e8b38b3 Ensured that the archive module consistantly explicitly closed all files. 2012-08-15 02:53:40 -07:00
Claude Paroz 928baee747 [py3] Fixed conditional_processing tests 2012-08-14 23:35:12 +02:00
Claude Paroz 7d48e077b5 [py3] Fixed staticfiles tests 2012-08-14 17:24:31 +02:00
Claude Paroz c2d59e5564 [py3] Fixed admin_views tests
Also changed several occurrences of 'request' to 'response'.
2012-08-14 14:45:28 +02:00
Aymeric Augustin 0c198b85a3 [py3] Replace filter/lambda by list comprehensions
This is more idiomatic and avoids returning a list on Python 2 and
an iterator on Python 3.
2012-08-14 14:31:06 +02:00
Claude Paroz 45baaabafb [py3] Fixed encoding issues in cache key generation 2012-08-13 12:56:59 +02:00
Claude Paroz ac37c9e495 [py3] Encoded value before feeding it to hashlib.md5 2012-08-12 22:49:10 +02:00
Aymeric Augustin 4e68e86153 [py3] Deprecated StrAndUnicode.
This mix-in is superseded by the @python_2_unicode_compatible decorator.
2012-08-12 14:44:41 +02:00
Aymeric Augustin 79d62a7175 [py3] Added fixer for python_2_unicode_compatible.
This doesn't deal with classes that define both __unicode__ and
__str__; the definition of __str__ should be removed first. It
doesn't guarantee that __str__ will return a str (rather than bytes)
under Python 3 either.
2012-08-12 14:44:40 +02:00
Aymeric Augustin a0a0203a39 [py3] Added python_2_unicode_compatible decorator. 2012-08-12 14:44:40 +02:00
Claude Paroz 900816464d [py3] Re-decoded string after idna encoding 2012-08-11 23:23:31 +02:00
Claude Paroz b8e49d70f2 [py3] Replaced raw_input by input
The six addition has been borrowed from:
https://bitbucket.org/gutworth/six/changeset/733ef740
2012-08-08 19:53:11 +02:00
Alex Gaynor 4c97101b1f remove a bunch of unnescesarry iterkeys() calls 2012-08-08 07:33:15 -07:00
Claude Paroz 576ec12f8e [py3] Replaced __nonzero__ by __bool__
Of course, __nonzero__ alias has been kept for Python 2 compatibility.
2012-08-08 15:02:31 +02:00
Aymeric Augustin a4abe7ed56 [py3] abspathu doesn't exist under Python 3. 2012-08-08 12:56:12 +02:00
Aymeric Augustin 64e2e35627 [py3] Ported django.utils.tzinfo. 2012-08-07 12:00:24 +02:00
Aymeric Augustin 9e8df02d68 [py3] Ported django.utils.translation. 2012-08-07 12:00:24 +02:00
Aymeric Augustin 17da0aa893 [py3] Ported django.utils.regex_helper. 2012-08-07 12:00:24 +02:00
Aymeric Augustin fe8484efda [py3] Ported django.utils.functional. 2012-08-07 12:00:23 +02:00
Aymeric Augustin 7e01e532c0 [py3] Ported django.utils.feedgenerator. 2012-08-07 12:00:23 +02:00
Aymeric Augustin 127b461b11 [py3] Ported django.utils.crypto. 2012-08-07 12:00:23 +02:00
Aymeric Augustin 13338a6314 [py3] Minor cleanup in django.utils.archive. 2012-08-07 12:00:23 +02:00
Aymeric Augustin c5ef65bcf3 [py3] Ported django.utils.encoding.
* Renamed smart_unicode to smart_text (but kept the old name under
  Python 2 for backwards compatibility).
* Renamed smart_str to smart_bytes.
* Re-introduced smart_str as an alias for smart_text under Python 3
  and smart_bytes under Python 2 (which is backwards compatible).
  Thus smart_str always returns a str objects.
* Used the new smart_str in a few places where both Python 2 and 3
  want a str.
2012-08-07 12:00:22 +02:00
Aymeric Augustin ee191715ea [py3] Fixed access to dict keys/values/items. 2012-08-07 12:00:22 +02:00
Tim Graham 86c5c0154f Fixed a mistake in function documentation 'django.utils.functional.partition'
Thanks Raman Barkholenka for the patch.
2012-08-04 18:56:43 -04:00
Aymeric Augustin d01eaf7104 [py3] Removed uses of sys.maxint under Python 3.
Also fixed #18706: improved exceptions raised by int_to_base36.
2012-08-03 18:51:28 +02:00
Alex Gaynor 129f1ac848 Remove a temporary variable deletion, it's not a big deal and it doesn't exist on python3. 2012-08-03 07:10:04 -07:00
Alex Gaynor e567f439bd Merge pull request #225 from dekkers/remove-double-isinstance-check
Remove double isinstance check in force_unicode
2012-07-29 17:07:55 -07:00
Aymeric Augustin ab6cd1c839 [py3] Updated dict-like data structures for Python 3.
The keys/items/values methods return iterators in Python 3, and the
iterkeys/items/values methods don't exist in Python 3. The behavior
under Python 2 is unchanged.
2012-07-25 22:58:48 +02:00
Florian Apolloner 59d99772f0 Merge pull request #216 from ljosa/ticket_18644
Fixed #18644 -- Made urlize trim trailing period followed by parenthesis
2012-07-25 13:22:49 -07:00
Aymeric Augustin f3c9a16a42 Fixed QueryDict.setlistdefault.
It was broken by a seemingly innocuous change in MultiValueDict.
Document the pitfall for now. This is fragile and should be
considered for refactoring.
2012-07-25 19:10:40 +02:00
Aymeric Augustin 942818e1b3 Rolled back a unnecessary change in 8f002867b2.
This keeps the implementation of setdefault and setlistdefault
consistent. Also it's marginally faster than looking up the value
again.
2012-07-25 10:16:35 +02:00
Alex Gaynor 38ce709fe4 Added tests for deprecation warnings and fixed the argument order for the warnings. 2012-07-24 07:01:57 -07:00
Jeroen Dekkers 226a3e7e00 Remove double isinstance check in force_unicode 2012-07-24 00:45:40 +02:00
Claude Paroz 690cabe203 Used a Python 3-compatible syntax for building a translation table 2012-07-22 18:05:53 +02:00
Aymeric Augustin a84d79f572 [py3] Added Python 3 compatibility for xrange. 2012-07-22 09:29:56 +02:00
Aymeric Augustin ca07fda2ef [py3] Switched to Python 3-compatible imports.
xrange/range will be dealt with in a separate commit due to the huge
number of changes.
2012-07-22 09:29:56 +02:00
Aymeric Augustin 0d914d08a0 [py3] Updated urllib/urllib2/urlparse imports.
Lots of functions were moved. Use explicit imports in all cases
to keey it easy to identify where the functions come from.
2012-07-22 09:29:55 +02:00
Aymeric Augustin bdca5ea345 [py3] Replaced unicode/str by six.text_type/bytes. 2012-07-22 09:29:54 +02:00
Aymeric Augustin 3cb2457f46 [py3] Replaced basestring by six.string_types. 2012-07-22 09:29:54 +02:00
Aymeric Augustin 56dbe924a6 [py3] Removed longs. 2012-07-22 09:29:53 +02:00
Aymeric Augustin 473d5f4ba1 [py3] Fixed django.utils.six.moves.
It didn't work because six was inside django.utils.
2012-07-22 09:29:51 +02:00
Aymeric Augustin 8b01909841 [py3] Bundled six for Python 3 compatibility.
Refs #18363.
2012-07-22 09:29:44 +02:00
Aymeric Augustin 38c18f1747 Switched to octal notation (bis). 2012-07-20 13:42:44 +02:00
Aymeric Augustin 324d48d0a7 Switched to Python 3-compatible octal notation. 2012-07-20 13:28:36 +02:00
Vebjorn Ljosa d5012d6371 Fixed #18644 -- Made urlize trim trailing period followed by parenthesis 2012-07-17 12:44:02 -04:00
Alex Gaynor c57abd3c29 Remove DotExpandedDict, which was undocumented and unused. 2012-07-14 19:04:37 -07:00
Alex Gaynor 0f57935bcd Fix an incredibly emberassing typo. 2012-07-14 17:08:52 -07:00
Alex Gaynor 8b3c2f2c51 Deprecate two methods (which I seriously doubt anyone ever used, but they were documented so...) because they cannot be implemented efficiently on top of collections.SortedDict in Python 2.7 and up. 2012-07-14 16:08:42 -07:00
Alex Gaynor 8f002867b2 Cleaned up the QueryDict implementation.
- Use super().
- Don't poke at internals.
- Don't override methods for no reason.
2012-07-14 14:07:11 -07:00
Aymeric Augustin 9a25d8618a Update links to diveintomark.org.
These pages are gone.
2012-07-14 12:32:39 +02:00
Guilherme Gondim 91e4f7effb Fix copyright holder 2012-07-06 15:24:07 -03:00
Luke Plant bee498f3a2 Added 'format_html' utility for formatting HTML fragments safely 2012-07-03 22:20:12 +01:00
Luke Plant f33e150369 Documented utils.html.escape and conditional_escape 2012-07-03 22:20:12 +01:00
Florian Apolloner 6bc1b22299 Fixed our HTMLParser patches for python 2.7.4 2012-06-22 15:09:26 +02:00
Claude Paroz fe873e2765 Fixed #12140 -- Fixed http.urlencode result for empty lists
Thanks aneil for the report and the initial patch.
2012-06-14 11:32:40 +02:00
Anssi Kääriäinen 90985048fc Used git log instead of git show for last commit's timestamp
The reason for this was that git show included the whole changeset in
the output, but only the UTC timestamp was needed. By using git log
it is possible to get just the timestamp. The whole changeset can be
large, and can cause unicode encoding errors.
2012-06-08 23:04:03 +03:00
Claude Paroz 5e6ded2e58 Fixed #18363 -- Added Python 3 compatibility layer.
Thanks Vinay Sajip for the support of his django3 branch
and Alex Gaynor, kezabelle, YorikSar for the review.
2012-06-07 18:36:53 +02:00
Claude Paroz 4a103086d5 Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.
Thanks Vinay Sajip for the support of his django3 branch and
Jannis Leidel for the review.
2012-06-07 18:08:47 +02:00
Claude Paroz eb286aa22f Delayed encoding of password and salt in password checking.
Applied the rule that string encoding should happen as late as
possible. This is also a preparation for Python 3 compatibility.
2012-06-06 10:53:16 +02:00
Claude Paroz 28e424532f Removed unneeded smart_str in cache utils. 2012-05-28 21:13:09 +02:00
Claude Paroz 817535d73e Replaced types.NoneType occurrences
In Python 3, types.NoneType is no more available.
2012-05-23 12:20:03 +02:00
Claude Paroz 35e6585568 Imported reduce from functools for forward compatibility.
In Python 3, reduce has to be imported from functools.
2012-05-20 00:25:46 +02:00
Claude Paroz 38408f8007 Marked bytestrings with b prefix. Refs #18269
This is a preparation for unicode literals general usage in
Django (Python 3 compatibility).
2012-05-19 17:43:34 +02:00
Claude Paroz d04f72fb31 Got rid of old __cmp__methods replaced by rich comparison.
The __cmp__ methods are unsupported in Python 3.
_doctest.py has been left untouched because it is likely it will
not be migrated to Python 3.
2012-05-18 14:52:24 +02:00
Adrian Holovaty 25128856f5 Fixed typo in utils/archive.py docstring 2012-05-11 13:51:19 -05:00
Claude Paroz 169b1a404c Replaced foo.next() by next(foo).
This new syntax for next() has been introduced in Python 2.6 and is
compatible with Python 3.
2012-05-10 20:15:49 +02:00
Anssi Kääriäinen 9877e84caa Fixed total_ordering for Python < 2.7.2
The total_ordering in Python versions prior to 2.7.2 is buggy, and
this caused infinite recursion for Field comparisons on those
versions. Use the borrowed total_ordering for all Python versions
prior to 2.7.2.

The buggy total_ordering was introduced in commit
5cbfb48b92
2012-05-07 21:03:21 +03:00
Simon Charette 5cbfb48b92 Made model fields comparable to other objects
Fixed #17851 -- Added __lt__ and @total_ordering to models.Field,
made sure these work correctly on other objects than Field, too.
2012-05-07 20:08:20 +03:00
Claude Paroz d7dfab59ea Replaced cStringIO.StringIO by io.BytesIO.
Also replaced StringIO.StringIO by BytesIO in some other appropriate
places. StringIO is not available in Python 3.
2012-05-05 21:41:44 +02:00
Alex Gaynor 1583d40224 Fixed the syntax used for the Python repl examples in docs and docstrings. 2012-05-05 09:54:30 -05:00
Claude Paroz 865cd35c9b Made more extensive usage of context managers with open. 2012-05-05 14:06:36 +02:00
Aymeric Augustin e84f79f051 Fixed #18042 -- Advanced deprecation warnings.
Thanks Ramiro for the patch.
2012-05-03 15:27:01 +02:00
Claude Paroz 596cb9c7e2 Replaced print statement by print function (forward compatibility syntax). 2012-04-30 20:45:03 +02:00
Anssi Kääriäinen 4b11762f7d Fixed SortedDict.__copy__()
Fixed #18175 -- Calling SortedDict.__copy__() resulted in changes to
the original dictionary. The reason was likely related to subclassing
dict.

Thanks to linovia for report and patch.
2012-04-30 17:19:55 +03:00
Alex Gaynor aa1aa1ad41 Fix a typo in a comment. 2012-04-30 10:15:36 -04:00
Claude Paroz 3904b74a3f Fixed #18013 -- Use the new 'as' syntax for exceptions.
Thanks Clueless for the initial patch.
Note that unittest has been purposely left out (external package only used by Python 2.6).
2012-04-29 20:57:15 +02:00
Adrian Holovaty 5b644a5464 Moved version code out of __init__.py.
Moved everything except VERSION and a get_version() stub out of the top-level __init__.py, so that we're not importing all that stuff all the time. And because it's cleaner.
2012-04-29 13:44:32 -05:00
Aymeric Augustin cec6bd5a59 Fixed #18023 -- Removed bundled simplejson.
And started the deprecation path for django.utils.simplejson.

Thanks Alex Ogier, Clueless, and other contributors for their
work on the patch.
2012-04-29 19:58:00 +02:00
Aymeric Augustin a15cfb2e45 Simplified timezones tests with settings_changed.
All relevant state is now properly reset whenever TIME_ZONE or USE_TZ
are changed in tests.
2012-04-29 16:03:46 +02:00
Aymeric Augustin 3e8b40f479 Fixed #17992 -- Added a public API for localtime.
Thanks Bradley Ayers for the report.
2012-04-29 15:37:23 +02:00
Aymeric Augustin 02a5b41db4 Fixed #18224 -- Changed the dev version number.
Following the move from SVN to git.
2012-04-29 13:40:10 +02:00
Not Carl 6b430b883f Whitespace formatting 2012-04-28 14:58:11 -04:00
Not Carl a7829f3334 forgot the allow_lazy(phone2numeric) 2012-04-28 03:33:37 -04:00
Not Carl cfe552ccb3 Modified phone2numeric to not use regular expression or lambdas 2012-04-28 03:29:42 -04:00
Claude Paroz e2548ec2a9 Fixed #18071 -- Ignored case sensitivity in urlize utility. Thanks luke@creaturecreative.com and adamzap for the report and the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17898 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-11 17:49:22 +00:00
Ramiro Morales cac5d9fd80 Fixed #18022 -- Fixed import of standalone Python 'json' module.
Thanks Clueless for the report and initial patch.

Refs #17071, r17018.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17865 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-04-01 21:11:46 +00:00
Ramiro Morales b41ebcf1b9 Fixed #18040 -- Removed so-called project-level locale trees from the list of paths the translation loading process takes in account.
Deprecated in Django 1.3. Removed completely for Django 1.5.

Thanks Claude for the review.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17861 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 22:24:24 +00:00
Claude Paroz 23d3459761 Fixed #17965 -- Definitely dropped support for Python 2.5. Thanks jonash for the initial patch and Aymeric Augustin for the review.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17834 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-31 08:24:29 +00:00
Aymeric Augustin 4fe87c370d Removed some Python < 2.6 compatibility code. Refs #17965.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17830 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 09:20:04 +00:00
Claude Paroz 9383a2761c Removed with_statement imports, useless in Python >= 2.6. Refs #17965. Thanks jonash for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17828 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-30 08:02:08 +00:00
Aymeric Augustin 1e28567e0d Fixed #17937 -- Avoided an error in the timeuntil filter when it receives a date object. Thanks Dmitry Guyvoronsky for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17774 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-22 07:29:39 +00:00
Jannis Leidel 2f520139be Fixed #17873 -- Removed stale code from translation utilities that should have been removed a while ago. Thanks, Aymeric Augustin.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17684 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-12 18:51:48 +00:00
Aymeric Augustin 7ce1ad7c03 Made django.utils.timezone.localtime a private API -- it's too specific to the template engine.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17642 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-03 19:57:25 +00:00
Carl Meyer 98a1e14e09 Fixed #17730 - Renamed django.utils.htmlparser to django.utils.html_parser to avoid shadowing stdlib HTMLParser in rare case-sensitivity situations. Thanks un33k for the report and gldnspud for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17607 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-03-01 16:09:01 +00:00
Aymeric Augustin e0d78f898f Fixed #17715 -- Updated the tutorial for time zone support, plus a few other improvements.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17591 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-26 21:17:58 +00:00
Paul McMillan 1525874238 Improved get_random_string().
Improved the behavior of get_random_string to re-seed itself each time it is called
if the system does not have a secure random number generator. This will change the
properties of the random string produced, but will be unpredictable to an attacker.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17581 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-23 22:51:14 +00:00
Paul McMillan 239e41f7c5 Cleanup to use get_random_string consistently.
Removes several ad hoc implementations of get_random_string()
and removes an innapropriate use of settings.SECRET_KEY.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17580 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-23 21:39:12 +00:00
Jannis Leidel 7dd0ceba2e Fixed #17720 -- Stopped the LocaleMiddleware from overeagerly using the request path for language activation if it's actually not wanted. Thanks to Anssi Kääriäinen for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17547 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-18 13:37:30 +00:00
Alex Gaynor b9b3e9f0ef Use Python's changed comparisons, which makes this a bit more readable.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17526 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-16 01:10:21 +00:00
Paul McMillan 6072e108e2 Fixed #17693. Input validation and tests for base36 conversion utils. Thanks Keryn Knight for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17525 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-16 00:58:49 +00:00
Jannis Leidel 1c9c29b5b2 Fixed AdminEmailHandler to format the subject message correctly when arguments are passed.
This bug was hidden before r17480 as it basically didn't take the arguments into account. Refs #14973.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17512 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-12 12:19:02 +00:00
Julien Phalip 995f7a16a8 Fixed #17281 -- Prevented `AdminErrorHandler` from silently failing if the log message contains newlines. Thanks to Russell Keith-Magee for the report and to Bartolome Sanchez Salado and Marcin Wróbel for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17501 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 09:31:18 +00:00
Paul McMillan a77679dfaa Fixes #16827. Adds a length check to CSRF tokens before applying the santizing regex. Thanks to jedie for the report and zsiciarz for the initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17500 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-11 04:18:15 +00:00
Paul McMillan 114b655247 Fixed #15237 (again). RSS feeds now include proper character encoding in the mimetype. Thanks shadow for the report and Michal Rzechonek for the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17494 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-10 23:45:22 +00:00
Jannis Leidel c1acda6d8f Updated a few localization formats to stop the changes done in r17473 from breaking the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17486 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-10 01:13:29 +00:00
Jannis Leidel a6b6c6e171 Fixed #16416 -- Added two new date formatting options for timezones and ISO week numbers. Thanks, poirier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17473 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:57:31 +00:00
Aymeric Augustin bd58612514 Fixed #17634 -- Optimized the performance of MultiValueDict by using append instead of copy and by minimizing the number of dict lookups. Refs #736.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17464 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-09 18:41:20 +00:00
Jannis Leidel 44d1791779 Fixed #17641 -- Work around an issue in Python distributions that remove the module attribute ('2.7.2+'). Many thanks to Ramiro Morales for finding it.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17456 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-05 10:29:08 +00:00
Jannis Leidel ef4d84d11a Fixed #17555 -- Added support for a missing trailing slash when redirecting based on the browser language. Thanks, neaf.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17443 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 18:43:20 +00:00
Jannis Leidel e734477bd7 Fixed #17592 -- Handle URLs starting with a dot when using urlize. Thanks, Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17435 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-04 16:05:48 +00:00
Adrian Holovaty 20dbbcc264 Small fix to comments in utils/html.py from [17347]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17424 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-03 17:57:15 +00:00
Paul McMillan 1030d66a14 Fixed #17481. pbkdf2 hashes no longer ommit leading zeros.
Some existing user passwords may need to be reset or converted 
after this change. See the 1.4-beta release notes for more details.

Thanks bhuztez for the report and initial patch, claudep for the test.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17418 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-02-02 04:44:17 +00:00
Carl Meyer 844a24bbb9 Fixed #16921 -- Added assertHTMLEqual and assertHTMLNotEqual assertions, and converted Django tests to use them where appropriate. Thanks Greg Müllegger.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17414 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-31 20:36:11 +00:00
Aymeric Augustin d9061c01a9 Fixed #5964 -- Added unicode-aware versions of urlunquote and urlunquote_plus.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17407 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-29 09:00:12 +00:00
Aymeric Augustin 1d54e3a956 Fixed #15828 -- Removed explicit implementation of empty setUp / tearDown methods. Backport of http://hg.python.org/unittest2/rev/3d33f92496fa.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17398 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-27 22:25:44 +00:00
Aymeric Augustin 62766f4248 Reverted parts of r17359 that could cause false positives in URL detection, especially on file names.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17364 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 21:36:22 +00:00
Aymeric Augustin 15d10a5210 Fixed #11911 -- Made the urlize filter smarter with closing punctuation.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17362 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 19:42:14 +00:00
Alex Gaynor 4a92059b08 Try to save memory and time when using lazy objects by refering to their function via the closure, and not making it an attribute on each instance.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17360 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 19:16:33 +00:00
Aymeric Augustin 05a3ecbf96 Fixed #16656 -- Changed the urlize filter to accept more top-level domains.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17359 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 16:08:43 +00:00
Aymeric Augustin 27508918fb Fixed #16395 -- Prevented urlize from highlighting some malformed URLs. Thanks BernhardEssl for the report and initial patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17358 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 15:43:32 +00:00
Aymeric Augustin aa4e152296 Fixed #12183 -- Made the urlize filter insert the nofollow attribute properly when an http: URL occurs after a mailto: URL. Thanks eronen for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17356 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-08 09:51:36 +00:00
Aymeric Augustin f21a9da485 Fixed #13704 -- Handled IDN properly in the urlize template filter. Thanks Claude Paroz for the initial version of the patch.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17348 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-07 18:39:14 +00:00
Aymeric Augustin e3a7bfccbb Fixed #9655 -- Prevented the urlize template filter from double-quoting URLs. Thanks Claude Paroz for writing the tests.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-07 18:15:28 +00:00
Chris Beaven e52c52ea13 Fixed #17492 -- Allow reversal of named backreferences. Thanks nate_b
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17336 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-03 22:49:13 +00:00
Aymeric Augustin fc9e0606d5 Fixed a stupid bug in the implementation of timezone.make_aware.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17332 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-02 20:45:09 +00:00
Julien Phalip 1572a3d4b2 Fixed #10931 -- Made `Truncator` handle newlines properly. Thanks to gsong and Claude Paroz.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2012-01-02 18:47:18 +00:00
Aymeric Augustin baf63f6e57 Fixed #10725 -- When the child process spawned by the autoreloader gets killed by a signal, passed the signal to the parent, in order to make debugging easier.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@17296 bcc190cf-cafb-0310-a4f2-bffc1f526a37
2011-12-30 14:12:31 +00:00