show code in template

22 views
Skip to first unread message

Hanz

unread,
Apr 7, 2015, 6:18:33 PM4/7/15
to django...@googlegroups.com
Hi everyone,
i want to show some piece of code on my website. What is the best way to do it? (embed into template)

>>> <a href="{{ object.get_absolute_url }}">{{ object.name }}</a>

Regards,
Hanz

Luis Zárate

unread,
Apr 7, 2015, 6:26:42 PM4/7/15
to django...@googlegroups.com
I don't understand what you want to do but I guest it's like verbatim

https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#verbatim

--
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 post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/681ea031-1078-4e5f-ab27-f806c4906663%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
"La utopía sirve para caminar" Fernando Birri


Hanz

unread,
Apr 8, 2015, 12:11:42 PM4/8/15
to django...@googlegroups.com
Thank you for idea Luisza14,
verbatim tag is that thing what i needed....

>>>  {% verbatim html %}
>>>         &lt;a href="{{ object.get_absolute_url }}"&gt; {{object.name}} &lt;/a&gt;
>>>> {% endverbatim html %}

Hanz



Dne úterý 7. dubna 2015 20:26:42 UTC+2 luisza14 napsal(a):
Reply all
Reply to author
Forward
0 new messages