Juergen Barth <juergen <at> barth-partners.com> writes:

> 
> 
> Adam M Peacock wrote:
> > I'm currently writing a webapp in Django that will have some custom
> > functions, such as sending email to a group of users - I would like to
> > be able to leveredge Django's admin interface for the task, but I can't
> > figure how where/how to make a custom page in the admin interface,
> > ideally one that would tie into the permissions system nicely.
> 
> Or you could follow the instructions found here:
> http://code.djangoproject.com/wiki/ExtendingAdminTemplates
> I used exactly this to get my email facility integrated. Give it a try,
> its really easy!
> 

In general, you can look at the templates in contrib.Admin and maybe use some
blocks, or add a block to your own copy of the template.
{% block after_field_sets %}{% endblock %}
{% block after_related_objects %}{% endblock %}

At some point, you just have to deal with building your own admin form, but you
can still have you template extend "admin/base_site" and leverage the admin CSS,
etc.

It is easy to intercept the admin url, as in:
urlpatterns += patterns('',
    (r'^admin/manager/sale/add/$', 'sale.add'),
    (r'^admin/', include('django.contrib.admin.urls')),
)

If you go this route, you may still be able to take advantage of generic views,
e.g. django.views.generic.create_update.create_object.

Peace,
David S.



--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to