7 | | --- |
8 | | I understand from the docs that when it is needed to pass a url in the django `view_on_site` button , one can use `get_absolute_url(self, obj)` and preferably the `reverse()` method. |
9 | | |
10 | | Assuming that the needed url is `http://127.0.0.1:8000/test` we can form it accordingly and return it. |
11 | | |
12 | | This mechanism is not working either in the main model view or when the model is an inline. It seems to be no way, to alter the default `http://127.0.0.1:8000/admin/r/19/3305/` that `view_on_site` returns. |
13 | | |
14 | | I have used django-suit as an example to show that in the main model view, the desired url is indeed returned as [https://docs.djangoproject.com/en/1.10/ref/contrib/admin/#django.contrib.admin.ModelAdmin.view_on_site django docs] describe. |
15 | | |
16 | | |
17 | | |