Tumblelog by Soup.io
Newer posts are loading.
You are at the newest post.
Click here to check if anything new just came in.

ExtendibleAdmin class

A generic base class for extending ModelAdmin views. This can be used likewise:

def myview(self, request, object_id):
    obj = self._getobj(request, object_id)
    < do something >

def get_urls(self):
    urls = super(MyAdmin, self).get_urls()

    my_urls = patterns('',
        url(r'^(.+)/myview/$', 
            self._wrap(self.myview), 
            name=self._view_name('myview')),
        )

    return my_urls + urls

Don't be the product, buy the product!

Schweinderl