Awesome.. Worked.. Thanks !!
~ramyak/

On Oct 22, 3:52 pm, bruno desthuilliers
<[EMAIL PROTECTED]> wrote:
> n 22 oct, 12:14, ramya <[EMAIL PROTECTED]> wrote:
>
> > I am probably turning blind.. but I am still not able to figure out
> > why string "value" is being passed instead of value "value"
>
> http://docs.djangoproject.com/en/dev/howto/custom-template-tags/#pass...
>
> class FormatTimeNode(template.Node):
>     def __init__(self, date_to_be_formatted):
>         self.date_to_be_formatted =
> template.Variable(date_to_be_formatted)
>
>     def render(self, context):
>         try:
>             actual_date = self.date_to_be_formatted.resolve(context)
>             return actual_date.strftime(YOUR_FORMAT_STRING_HERE)
>         except template.VariableDoesNotExist:
>             return ''
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to