Changes between Version 1 and Version 2 of Ticket #27757, comment 10


Ignore:
Timestamp:
Jan 24, 2017, 12:05:09 PM (8 years ago)
Author:
George Tantiras

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #27757, comment 10

    v1 v2  
    11Sorry, I have no intention to offend, I have corrected the inaccurate expression.
    2 
    3 Update
    42
    53Oh, it redirects. Ups.
    64I will still need to verify it when I return home.
    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 
Back to Top