Add your own template library

2012-09-30 Thread Ashish Jain
Hi, I have created a custom template tags library which I would like to use across my application. I referred this code snippet, http://djangosnippets.org/snippets/342/ but still when I refer the tag in my code as: {% load repeat %}. It says 'repeat' is not a valid tag library, tried django.te

Re: Add your own template library

2012-09-30 Thread Ashish Jain
Ashish, > Is there __init__.py in your templatetags directory ? > > cheers > *Laxmikant* > > > On Mon, Oct 1, 2012 at 9:36 AM, Ashish Jain > > wrote: > >> Hi, >> >> I have created a custom template tags library which I would like to use >>

Re: Add your own template library

2012-10-01 Thread Ashish Jain
third loaded library has tags 'repeat' but, t = django.template.Template('{% load repeat %}') throws the same error. - Regards Ashish On Monday, 1 October 2012 10:29:44 UTC+5:30, Ashish Jain wrote: > > Hi, > > Yes it do have __init__.py > > I have created a simple project of t

Re: Add your own template library

2012-10-01 Thread Ashish Jain
ghtway the repeat can be used. - Thanks On Monday, 1 October 2012 14:13:28 UTC+5:30, Tom Evans wrote: > > On Mon, Oct 1, 2012 at 5:59 AM, Ashish Jain > > > wrote: > > Hi, > > > > Yes it do have __init__.py > > > > I have created a simple project of

Re: Add your own template library

2012-10-02 Thread Ashish Jain
ier Guerra wrote: > > On Sun, Sep 30, 2012 at 11:59 PM, Ashish Jain > > > wrote: > > After which I am referring it into my website. > > ... and on settings.py? > > -- > Javier > -- You received this message because you are subscribed to the Google Group

Print html the normal way

2012-10-05 Thread Ashish Jain
Hi, I wrote a simple filter as: @register.filter() def html(value): return 'Check' when I use this filter in my template, it displays html as: Check I want to display as: Check am I missing something. - Thanks for your help Ashish -- You received this message because you a

Re: Print html the normal way

2012-10-05 Thread Ashish Jain
Hi, Thanks a ton!! using mark_safe() worked perfectly. - Regards Ashish On Friday, 5 October 2012 14:10:31 UTC+5:30, Tom Evans wrote: > > On Fri, Oct 5, 2012 at 9:20 AM, Ashish Jain > > > wrote: > > Hi, > > > > I wrote a simple filter as: > > >