On Mon, Feb 16, 2009 at 11:49 AM, Daniel Roseman <
roseman.dan...@googlemail.com> wrote:

>
> On Feb 16, 4:23 pm, Ben Gerdemann <gerd...@gmail.com> wrote:
> > Is it possible to add a custom template tag to the admin without
> > modifying the Django source? I'd like to add a tag to display a
> > different submit_line, but the only way I can figure out how to do
> > this is by either adding one of the existing template tags in django/
> > contrib/admin/templatetags or adding a new file in the directory. I
> > tried adding a templatetags directory to my app, but it doesn't work
> > because Django only searches for template tags in the templatetag
> > directory of the active app. Any ideas about how to do this without
> > hacking the source?
> >
> > Cheers,
> > Ben
>
> I don't know why you think that Django only searches in the 'active
> app', but it's not true. As long as the app is present in
> INSTALLED_APPS, Django will make its template tags available to any
> other application. So all you need to do in order to get your tag into
> the admin is to customise your admin template (instructions are in the
> docs) and refer to it there.


I'm not quite following the original problem description either, but this
ticket:

http://code.djangoproject.com/ticket/9460

highlights that it is not at present very easy to override just the
submit_line, so perhaps that is coming into play.  If so, feedback in that
ticket as to whether the blocks defined there are helpful in solving
whatever problem is being encountered here would be useful.

Karen

--~--~---------~--~----~------------~-------~--~----~
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