summaryrefslogtreecommitdiff
path: root/django/utils/text.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed #6668 -- Optimized utils.text wrap functionMarkus Amalthea Magnuson2014-05-171-20/+23
| | | | | This fixes a failing test after applying an optimization of the utils.text.wrap function by user SmileyChris.
* Fixed #21188 -- Introduced subclasses for to-be-removed-in-django-XX warningsClaude Paroz2014-03-081-1/+2
| | | | | Thanks Anssi Kääriäinen for the idea and Simon Charette for the review.
* Deprecated django.utils.text.javascript_quote.Baptiste Mispelon2014-02-221-0/+6
| | | | Refs #21725.
* Fixed #21725 -- Fixed JavaScript quoting encoding.MattBlack852014-02-151-1/+1
| | | | Thanks to nedbatchelder for the report.
* Fixed #19496 -- Added truncatechars_html filter.Jeremy2014-02-131-20/+33
| | | | | Thanks esevece for the suggestion and Nick Sandford and Martin Warne for the inital work on the patch.
* Fixed #21731 -- Made javascript_quote escapes '</'.Vajrasky Kok2014-02-061-0/+1
|
* Removed a few gratuitous lambdas.Aymeric Augustin2013-12-261-0/+10
|
* Fixed #21651 -- Remove recapitalize.Marc Tamlyn2013-12-221-9/+0
| | | | | | | It was not used inside Django, is not tested or documented. Consequently remove without deprecation path. Thanks to @vajrasky for bringing it to our attention.
* Fixed #21574 -- Handle bytes consistently in utils.text.normalize_newlines.Baptiste Mispelon2013-12-121-1/+3
| | | | | | | | | All input is now coerced to text before being normalized. This changes nothing under Python 2 but it allows bytes to be passed to the function without a TypeError under Python3 (bytes are assumed to be utf-8 encoded text). Thanks to trac user vajrasky for the report.
* Fixed PEP257 violations (single-quoted docstrings) in utils.text.Baptiste Mispelon2013-12-121-2/+2
|
* Fixed E124 pep8 warnings.Loic Bistuer2013-12-101-2/+1
|
* Fixed #21573 -- Improved performance of utils.text.normalize_newlines.Vajrasky Kok2013-12-071-1/+2
|
* Correct flake8 E302 violationsRay Ashman Jr2013-11-021-0/+14
|
* Fixed #21302 -- Fixed unused imports and import *.Tim Graham2013-11-021-1/+1
|
* Fixed #21298 -- Fixed E301 pep8 warningsAlasdair Nicol2013-10-231-0/+1
|
* Fixed E227 pep8 warningsTim Graham2013-10-211-1/+1
|
* Fixed #21270 -- Fixed E701 pep8 warningsAlasdair Nicol2013-10-171-2/+4
|
* Fixed #20568 -- truncatewords_html no longer splits words containing HTML ↵Jaap Roes2013-10-081-1/+1
| | | | | | entities. Thanks yann0 at hotmail.com for the report.
* Fix #21185: Added tests for unescape_entities.Baptiste Mispelon2013-09-271-2/+2
| | | | | Also fixed a py3 incompatibility. Thanks to brutasse for the report.
* Replaced "not PY3" by "PY2", new in six 1.4.0.Aymeric Augustin2013-09-021-1/+1
|
* Fixed #20989 -- Removed useless explicit list comprehensions.Simon Charette2013-08-301-1/+1
|
* Removed several unused imports.Aymeric Augustin2013-06-191-1/+0
|
* Fixed #20231 -- Don't use allow_lazy on smart_splitBaptiste Mispelon2013-04-101-1/+0
|
* Fixed #19693 -- Made truncatewords_html handle self-closing tagsClaude Paroz2013-02-131-1/+1
| | | | Thanks sneawo for the report and Jonathan Loy for the patch.
* Removed truncate_words and truncate_html_words.Aymeric Augustin2012-12-291-14/+0
|
* Fixed #7581 -- Added streaming responses.Aymeric Augustin2012-10-201-0/+31
| | | | Thanks mrmachine and everyone else involved on this long-standing ticket.
* Reordered importsAymeric Augustin2012-08-231-4/+5
| | | | to avoid an error introduced in 5301a9d7b1.
* [py3] Removed duplicate imports.Aymeric Augustin2012-08-231-2/+1
| | | | Fixed #18837. Refs #18791.
* [py3] Made 212b9826bd Python 3-friendlyAymeric Augustin2012-08-181-3/+3
|
* Fixed #14516 -- Extract methods from removetags and slugify template filtersMarc Tamlyn2012-08-181-0/+12
| | | | | | | | 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.
* Fix changes introduced in fd04e7 so they don't break on Python 3.Ramiro Morales2012-08-151-3/+6
|
* Added import of force_unicode to utils/text.pyAdrian Holovaty2012-08-151-1/+3
| | | | For backwards compatibility with stupid people like me. Refs #18772.
* [py3] Fixed admin_views testsClaude Paroz2012-08-141-1/+1
| | | | Also changed several occurrences of 'request' to 'response'.
* [py3] Ported django.utils.encoding.Aymeric Augustin2012-08-071-12/+12
| | | | | | | | | | | * 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.
* [py3] Switched to Python 3-compatible imports.Aymeric Augustin2012-07-221-2/+2
| | | | | xrange/range will be dealt with in a separate commit due to the huge number of changes.
* [py3] Replaced unicode/str by six.text_type/bytes.Aymeric Augustin2012-07-221-12/+13
|
* Fixed #18269 -- Applied unicode_literals for Python 3 compatibility.Claude Paroz2012-06-071-22/+24
| | | | | Thanks Vinay Sajip for the support of his django3 branch and Jannis Leidel for the review.
* Replaced foo.next() by next(foo).Claude Paroz2012-05-101-1/+1
| | | | | This new syntax for next() has been introduced in Python 2.6 and is compatible with Python 3.
* Replaced cStringIO.StringIO by io.BytesIO.Claude Paroz2012-05-051-6/+2
| | | | | Also replaced StringIO.StringIO by BytesIO in some other appropriate places. StringIO is not available in Python 3.
* Fixed #18042 -- Advanced deprecation warnings.Aymeric Augustin2012-05-031-2/+2
| | | | Thanks Ramiro for the patch.
* Whitespace formattingNot Carl2012-04-281-1/+1
|
* forgot the allow_lazy(phone2numeric)Not Carl2012-04-281-0/+1
|
* Modified phone2numeric to not use regular expression or lambdasNot Carl2012-04-281-8/+6
|
* Fixed #10931 -- Made `Truncator` handle newlines properly. Thanks to gsong ↵Julien Phalip2012-01-021-2/+2
| | | | | | and Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17329 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5025 -- Add a "truncatechars" template filter. Many thanks to Chris ↵Jannis Leidel2011-07-141-79/+169
| | | | | | Beaven. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16542 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #16225 -- Removed unused imports. Many thanks to Aymeric Augustin for ↵Jannis Leidel2011-07-131-4/+11
| | | | | | the work on the patch and Alex for reviewing. git-svn-id: http://code.djangoproject.com/svn/django/trunk@16539 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #5672 -- Allow the separator in the get_text_list utility function to ↵Jannis Leidel2010-12-121-2/+5
| | | | | | be translated. Thanks, Claude. git-svn-id: http://code.djangoproject.com/svn/django/trunk@14876 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #11021 -- Clarified newline stripping behavior in the truncatewords ↵Russell Keith-Magee2010-08-071-3/+9
| | | | | | 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
* Fixed #12119. Changed smart_split to stop splitting on whitespace in quotes. ↵Joseph Kocherhans2010-02-241-3/+8
| | | | | | Thanks, emulbreh. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12581 bcc190cf-cafb-0310-a4f2-bffc1f526a37
* Fixed #6799 - added an `end_text` argument to ↵Jacob Kaplan-Moss2010-02-141-14/+16
| | | | | | | | | | | | `truncate_words`/`truncate_html_words`. This allows customizing the standard "..." end text. Yes, this is technically a feature sneaking in after the deadline, but I just couldn't bring myself to punt it again: we already used that excuse for not getting it into 1.1. Thanks to Adam Fast and Travis Cline for work on this patch. git-svn-id: http://code.djangoproject.com/svn/django/trunk@12431 bcc190cf-cafb-0310-a4f2-bffc1f526a37