#30180 closed Bug (worksforme)
@register.inclusion_tag, Character limit occurs when rendering text, localhost
Reported by: | Zafer ÇELİK | Owned by: | nobody |
---|---|---|---|
Component: | Template system | Version: | 2.1 |
Severity: | Normal | Keywords: | inclusion_tag, characters, limit, custom tag, localhost |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Hi,
I get a character limitation when I want to render the text bu using @register.inclusion_tag ( custom tags )
These character limits; 46 ( when {% for...), 62 ( using {% with... ), 117 ( directly with text )
When these limits are exceeded, the server is shutting down automatically and does not indicate any errors.
When the number of characters is below the specified limit, before I reboot the server ( manage.py runserver ), then the site is running ( 127.0.0.1:8000 )
I want to render text as long as I want, without limiting the number of characters.
Can I do that? How?
templatetags/custom_tags.py
@register.inclusion_tag('tags/metin_deneme.html') def metin_gonder(metin): return { 'metin': metin }
templates/index.html
{% metin_gonder 'ğüışçöÖÇŞİÜĞ Arama Yaptığınız Ürünler Fazla Olunca Ne Olacak Burası Sınır Mı Alt Satıra Geçti Devam Hala Mı Daha Fazl' %}<!-- 117 characters -->
templates/tags/metin_deneme.html
<h3>{{ metin }}</h3>
Please help me
Change History (3)
comment:1 by , 6 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
comment:2 by , 6 years ago
in this way, this text length, there is no problem for 117 characters,
templates/index.html
{% metin_gonder 'ğüışçöÖÇŞİÜĞ Arama Yaptığınız Ürünler Fazla Olunca Ne Olacak Burası Sınır Mı Alt Satıra Geçti Devam Hala Mı Daha Fazl' %}<!-- 117 characters -->
But when you entered 118 characters( I added only "a" the last ), server is shutting down automatically. Very very interesting situation.
I have tried different browsers and get the same results. I erased cahe....
For example;
{% metin_gonder 'ğüışçöÖÇŞİÜĞ Arama Yaptığınız Ürünler Fazla Olunca Ne Olacak Burası Sınır Mı Alt Satıra Geçti Devam Hala Mı Daha Fazla' %}
I can't get the same errors in another django project. But,
Do you have character limitation, which I guess there is no limitation, but I'm having this problem, it's very interesting.
After all, what could be the reason for this interesting situation that I've experienced?
What should I check?
Why would I have encountered this problem?
Can you specify if the solution is available. Please.
Thanks,
comment:3 by , 6 years ago
I don't know what the problem is. As I suggested, you could try posting the issue to our support channels.
I couldn't reproduce the issue. I added additional characters to
templates/index.html
and it rendered fine. You can ask for help debugging using the resources at TicketClosingReasons/UseSupportChannels.