#34567: slugify template filter with allow_unicode
-------------------------------+------------------------------------
     Reporter:  benjaoming     |                    Owner:  tuxo
         Type:  New feature    |                   Status:  assigned
    Component:  Uncategorized  |                  Version:  dev
     Severity:  Normal         |               Resolution:
     Keywords:                 |             Triage Stage:  Accepted
    Has patch:  0              |      Needs documentation:  0
  Needs tests:  0              |  Patch needs improvement:  0
Easy pickings:  1              |                    UI/UX:  0
-------------------------------+------------------------------------
Changes (by tuxo):

 * owner:  nobody => tuxo
 * status:  new => assigned
 * type:  Uncategorized => New feature
 * stage:  Unreviewed => Accepted


Comment:

 Reproduced.

 {{{
 >>> from django.utils.text import slugify
 >>> slugify("你好 ni hao")
 'ni-hao'
 >>> slugify("你好 ni hao", allow_unicode=True)
 '你好-ni-hao'
 }}}


 but given following context
 {{{
 {"my_text": "你好 ni hao"}
 }}}
 in the template
 {{{
 <p>{{ my_text | slugify }}</p>
 }}}

 it produces
 {{{
 ni-hao
 }}}

 i agree that a way to allow unicode from the template filter should exist

-- 
Ticket URL: <https://code.djangoproject.com/ticket/34567#comment:1>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/010701882267afbe-a4deac7f-62ff-4b94-825c-019b4ac4b2c9-000000%40eu-central-1.amazonses.com.

Reply via email to