> Once you have added a new HTML link to the template that will trigger
> your view, you have to write a view for it. You add something to one of
> your URL Conf files to catch the URL (do this *before* any admin
> patterns are processed, so that your pattern is handled first) and send
> it off to the view you have written. That view will just be a normal
> Django view, so you can use the normal permission decorators on the view
> if you like.

Or you can overload __call__ method of ModelAdmin class.
class PersonAdmin(admin.ModelAdmin):
  def __call__(self, request, url, *a, **k):
    if url.startswith('mypath'):
       return my_view(request)
    return super(PersonAdmin, self).__call__(request, url, *a, **k)


You still need to link it from custom admin template.


A.

>
> Regards,
> Malcolm
>
>
> >
>



-- 
------------------------------------------------------
Ales Zoulek
+420 604 332 515
Jabber: ales.zou...@gmail.com
------------------------------------------------------

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