darklow / django-suit

Modern theme for Django admin interface
http://djangosuit.com/
Other
2.31k stars 701 forks source link

Support for custom view_on_site() in ModelAdmin #665

Closed f213 closed 6 years ago

f213 commented 6 years ago

Hi!

Django admin allows to use callable view_on_site() within ModelAdmin.

This is useful when you want to customize admin URLs without changing get_absolute_url(). However, django-suit uses model get_absolute_url() attribute, bypassing this customisation.

This PR fixes it. It is safe to merge because the peace of code in django template context hasn't been changed for 4 years.