| 74 | |
| 75 | - - - - - |
| 76 | |
| 77 | Upon furthrer look into the issue, it seems that Django uses different strategies on casting variables to strings depending on place. For exaple, gettext_lazy("Branża") works swimmingly when assigned to form's field's verbose_name, but when its used in callable that returns list of field's choices, it raises. Similiarly I've created view like this: |
| 78 | |
| 79 | {{{ |
| 80 | # -*- coding: utf-8 -*- |
| 81 | from __future__ import unicode_literals |
| 82 | |
| 83 | from django.utils.translation import gettext_lazy |
| 84 | |
| 85 | def index(request): |
| 86 | print gettext_lazy('Branża') |
| 87 | }}} |
| 88 | |
| 89 | And it raises too, which points towards gettext_lazy("") changing behaviour after language has been activated. |