Hello,

I am trying to extend AdminSite so I can provide custom views, so far
i have this:

class MyAdminSite(AdminSite):

    def get_urls(self):
        urls = super(self.__class__, self).get_urls()
        my_urls = patterns('',
            (r'^myview/$', self.admin_view(myview))
        )
        return my_urls + urls

myadmin = MyAdminSite()

admpattern = patterns('', (r'^admin/', include(myadmin.urls)),)

It works fine, except for one reason. I don't get any ModelAdmin
registered in this admin, because all external apps register it doing
admin.site.register().

I figured out do add the registered models from site instance to
myadmin through:
myadmin._registry = site._registry

But it doesn't feel right.

Anyone with experience in this could point me out to the most correct
answer for this problem?

Thank you!

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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