def category_link(self, obj): if obj.category: return admin_utils.html_link( admin_utils.change_page_url(obj.category), str(obj.category))
def wikidata_entry_link(self, obj): if obj.wikidata_entry: return admin_utils.html_link(admin_utils.change_page_url(obj.wikidata_entry), str(obj.wikidata_entry))
def wikidata_link(self, obj): return admin_utils.html_link(obj.wikidata_url())
def openstreetmap_link(self, obj): return admin_utils.html_link(obj.openstreetmap_url(), "OpenStreetMap link")
def redirect_link(self, obj): if obj.redirect: return admin_utils.html_link( admin_utils.change_page_url(obj.redirect), str(obj.redirect))
def image_url_link(self, obj): return admin_utils.html_link(obj.image_url, "Image link")
def commons_link(self, obj): return admin_utils.html_link(obj.commons_url(), "Commons link")
def main_commons_file_link(self, obj): if obj.main_commons_file: return admin_utils.html_link( admin_utils.change_page_url(obj.main_commons_file), str(obj.main_commons_file))