how to prevent Django do auto capitalize static text in templates

81 views
Skip to first unread message

samuel nogueira bacelar

unread,
May 18, 2021, 8:08:25 AM5/18/21
to django...@googlegroups.com

Hi guys!

I have something that appears to be a simple problem but I didn’t find anything useful anywhere. My problem is that my text in a template next to a Django tag keeps auto capitalizing but I don’t want this to happen.

 

In the image above you can see that m³/ano and m² is not capitalized at all. But bellow my text keeps capitalizing.

 

 

How can I prevent that to happen?

 

David Tobrise

unread,
May 18, 2021, 8:56:31 AM5/18/21
to django...@googlegroups.com
What happens if you try outputting the units from dynamically instead of hard-coding it?

Best Regards,
David O. T.




--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/55BF1950-88D1-47E5-9654-18039E00E75E%40hxcore.ol.

RANGA BHARATH JINKA

unread,
May 18, 2021, 9:04:46 AM5/18/21
to django...@googlegroups.com
Hi,

Try this jinja templating lower filter

{{ 'helLo WOrlD'|lower }}



--
Thanks and Regards

J. Ranga Bharath
cell: 9110334114

712189512

unread,
May 18, 2021, 9:05:11 AM5/18/21
to django...@googlegroups.com
It’s not django that’s doing that,have you checked your css?

--
Gabrielstone😎

Samuel Nogueira

unread,
May 18, 2021, 9:18:34 AM5/18/21
to django...@googlegroups.com

712189512

unread,
May 18, 2021, 9:22:10 AM5/18/21
to django...@googlegroups.com
Put that in a span and use css text-transform and set it to lowercase 

--
Gabrielstone😎

Samuel Nogueira

unread,
May 18, 2021, 9:22:56 AM5/18/21
to django...@googlegroups.com
I didnt tried this yet, maybe should.


Samuel Nogueira

unread,
May 18, 2021, 9:24:11 AM5/18/21
to django...@googlegroups.com
I am using bootstrap, so my CSS shouldn't go wrong


Liu Zheng

unread,
May 18, 2021, 9:28:52 AM5/18/21
to django...@googlegroups.com
Checking CSS is the right way to go. To verify, simply comment out all css styles (internal or external ones) and strip off the classes from these few lines. You shouldn’t have capitalisation problem any more

Jason Turner

unread,
May 18, 2021, 9:29:42 AM5/18/21
to django...@googlegroups.com
Have you tried Bootstrap's class="text-lowercase"?

samuel nogueira bacelar

unread,
May 18, 2021, 9:34:12 AM5/18/21
to django...@googlegroups.com

Adding Bootstrap's class="text-lowercase" was the way to go. Thank you!!!!!!

 

Enviado do Email para Windows 10

Reply all
Reply to author
Forward
0 new messages