Hi,

we are using Template engine to convert some translatable textual class level
attributes, like [0]. In the process of migration to Django2.0, we got a problem
with template Lexer which raises a `TypeError: expected string or bytes-like
object` [1]

I'm not sure if are just misusing the template system to do something what it
wasn't designed for, or if this is a regression from Django 1.11. Previously
Django was using `force_text` to force evaluation of a lazy string [2] and Lexer
always got a text object.

We could force the evaluation of the lazy strings in the application, but I was
wandering if this is a regression, and should actually be fixed in Django?

Dražen


[0]
https://github.com/rapidpro/rapidpro/blob/master/temba/channels/types/telegram/type.py#L27
[1] https://github.com/django/django/blob/2.0.7/django/template/base.py#L349
[2]
https://github.com/django/django/commit/3a148f958dddd97c1379081118c30fbede6b6bc4#diff-8cbe1fb6d589cb6e35b956704d7a1285L154

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/bd16c255-f265-38ff-d444-8d267ab46d9b%40candela-it.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to