On Fri, Oct 19, 2012 at 6:21 PM, Nikhil Verma <varma.nikhi...@gmail.com> wrote:
> Hello people
>
> I need some suggestion in a problem.
>
> How can i stop django template engine  not executing {{name}}. Meaning I do
> not want that {{}}, the value should be printed it should somehow pass into
> the browser as it is.
> If i writing {{name}} it should print {{name}} in html file/browser

You have two options:

Option 1 - Use the {% templatetag %} templatetag:

https://docs.djangoproject.com/en/dev/ref/templates/builtins/#templatetag

{% templatetag openvariable %} hello {% templatetag closevariable

will render as

{{ hello }}

Option 2 -- if you have a large block of text that you want to render,
you can use the {% verbatim %} template tag

{% verbatim %}
This {{ content }} won't be processed.
{% endverbatim %}

Unfortunately, this option is only available in Django's trunk (so it
will be part of Django 1.5). However, there are plenty of snippets of
code you can use (including copying Django's own implementation) that
you can use in your own project.

Yours,
Russ Magee %-)

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to