Arthur de Jong

Open Source / Free Software developer

summaryrefslogtreecommitdiffstats
path: root/django/utils/text.py
Commit message (Collapse)AuthorAgeFilesLines
* Fixed #16501 -- Added an allow_unicode parameter to ↵Edward Henderson2015-07-171-4/+8
| | | | | | SlugField. Thanks Flavio Curella and Berker Peksag for the initial patch.
* Sorted imports with isort; refs #23860.Tim Graham2015-02-061-4/+4
|
* Fixed #24242 -- Improved efficiency of ↵Matthew Somerville2015-02-041-2/+5
| | | | | | | | | | | utils.text.compress_sequence() The function no longer flushes zfile after each write as doing so can lead to the gzipped streamed content being larger than the original content; each flush adds a 5/6 byte type 0 block. Removing this means buf.read() may return nothing, so only yield if that has some data. Testing shows without the flush() the buffer is being flushed every 17k or so and compresses the same as if it had been done as a whole string.
* Removed utils.text.javascript_quote() per deprecation ↵Tim Graham2015-01-171-29/+0
| | | | timeline; refs #21725.
* Fixed #23558 -- documented slugify limitationsDavid Hoffman2014-10-301-3/+3
|
* Fixed #20221 -- Allowed some functions that use ↵Jon Dufresne2014-10-201-2/+3
| | | | | | mark_safe() to result in SafeText. Thanks Baptiste Mispelon for the report.
* 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 ↵Claude Paroz2014-03-081-1/+2
| | | | | | | to-be-removed-in-django-XX warnings 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 ↵Baptiste Mispelon2013-12-121-1/+3
| | | | | | | | | | | utils.text.normalize_newlines. 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 ↵Baptiste Mispelon2013-12-121-2/+2
| | | | utils.text.
* Fixed E124 pep8 warnings.Loic Bistuer2013-12-101-2/+1
|
* Fixed #21573 -- Improved performance of ↵Vajrasky Kok2013-12-071-1/+2
| | | | utils.text.normalize_newlines.
* Correct flake8 E302 violationsRay Ashman Jr2013-11-031-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 ↵Jaap Roes2013-10-081-1/+1
| | | | | | words containing HTML 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 ↵Simon Charette2013-08-301-1/+1
| | | | comprehensions.
* 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 ↵Claude Paroz2013-02-131-1/+1
| | | | | | self-closing tags 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 ↵Marc Tamlyn2012-08-181-0/+12
| | | | | | | | | | 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.
* Fix changes introduced in fd04e7 so they don't break on ↵Ramiro Morales2012-08-161-3/+6
| | | | Python 3.
* 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 ↵Claude Paroz2012-06-071-22/+24
| | | | | | | compatibility. 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 ↵Not Carl2012-04-281-8/+6
| | | | lambdas
* Fixed #10931 -- Made `Truncator` handle newlines ↵Julien Phalip2012-01-021-2/+2
| | | | | | properly. Thanks to gsong and Claude Paroz. git-svn-id: http://code.djangoproject.com/svn/django/trunk@17329 bcc190cf-cafb-0310-a4f2-bffc1f526a37