[Django] #30180: @register.inclusion_tag, Character limit occurs when rendering text, localhost

10 views
Skip to first unread message

Django

unread,
Feb 12, 2019, 4:08:21 AM2/12/19
to django-...@googlegroups.com
#30180: @register.inclusion_tag, Character limit occurs when rendering text,
localhost
-------------------------------------+-------------------------------------
Reporter: zaferclk | Owner: nobody
Type: Bug | Status: new
Component: Template | Version: 2.1
system | Keywords: inclusion_tag,
Severity: Normal | characters, limit, custom tag,
Triage Stage: | localhost
Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
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

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

Django

unread,
Feb 12, 2019, 9:56:54 AM2/12/19
to django-...@googlegroups.com
#30180: @register.inclusion_tag, Character limit occurs when rendering text,
localhost
-------------------------------------+-------------------------------------
Reporter: Zafer ÇELİK | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: 2.1
Severity: Normal | Resolution:
Keywords: inclusion_tag, | worksforme

characters, limit, custom tag, | Triage Stage:
localhost | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* status: new => closed
* resolution: => worksforme


Comment:

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.

--
Ticket URL: <https://code.djangoproject.com/ticket/30180#comment:1>

Django

unread,
Feb 12, 2019, 11:18:19 AM2/12/19
to django-...@googlegroups.com
#30180: @register.inclusion_tag, Character limit occurs when rendering text,
localhost
-------------------------------------+-------------------------------------
Reporter: Zafer ÇELİK | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: 2.1
Severity: Normal | Resolution:
Keywords: inclusion_tag, | worksforme
characters, limit, custom tag, | Triage Stage:
localhost | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Zafer ÇELİK):

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,

--
Ticket URL: <https://code.djangoproject.com/ticket/30180#comment:2>

Django

unread,
Feb 12, 2019, 11:39:15 AM2/12/19
to django-...@googlegroups.com
#30180: @register.inclusion_tag, Character limit occurs when rendering text,
localhost
-------------------------------------+-------------------------------------
Reporter: Zafer ÇELİK | Owner: nobody
Type: Bug | Status: closed
Component: Template system | Version: 2.1
Severity: Normal | Resolution:
Keywords: inclusion_tag, | worksforme
characters, limit, custom tag, | Triage Stage:
localhost | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------

Comment (by Tim Graham):

I don't know what the problem is. As I suggested, you could try posting
the issue to our support channels.

--
Ticket URL: <https://code.djangoproject.com/ticket/30180#comment:3>

Reply all
Reply to author
Forward
0 new messages