Thursday, May 26, 2016

Re: I am not able to run the following code

I don't see any error here; what is the error message you see?


2016-05-26 10:16 GMT+02:00 Madhusudhana H V <hvmadhusudhana@gmail.com>:
I am trying to execute the following code. But I am getting error at step 2, namely ">>> t = template.Template('My name is {{ name }}.')"
Kindly help me out of this.

>>>
from django import template >>> t = template.Template('My name is {{ name }}.') >>> c = template.Context({'name': 'Adrian'}) >>> print t.render(c) My name is Adrian. >>> c = template.Context({'name': 'Fred'}) >>> print t.render(c) My name is Fred.

Thanks and Regards,
Madhusudhana H V

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/1da7713e-5019-4a96-b026-30ff4ecc13bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CACczBUJ0kXk8x0cp1g8vCbSUge4G8Dbt0v18BH9ivZF9Qm9OEA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment