MCPcopy
hub / github.com/liangliangyy/DjangoBlog / get_view_on_site_url

Method get_view_on_site_url

blog/admin.py:85–92  ·  view source on GitHub ↗
(self, obj=None)

Source from the content-addressed store, hash-verified

83 super(ArticlelAdmin, self).save_model(request, obj, form, change)
84
85 def get_view_on_site_url(self, obj=None):
86 if obj:
87 url = obj.get_full_url()
88 return url
89 else:
90 from djangoblog.utils import get_current_site
91 site = get_current_site().domain
92 return site
93
94
95class TagAdmin(admin.ModelAdmin):

Callers

nothing calls this directly

Calls 2

get_current_siteFunction · 0.90
get_full_urlMethod · 0.45

Tested by

no test coverage detected