MCPcopy
hub / github.com/django/django / get_latest_lastmod

Method get_latest_lastmod

django/contrib/sitemaps/__init__.py:108–117  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

106 return self._urls(page, protocol, domain)
107
108 def get_latest_lastmod(self):
109 if not hasattr(self, "lastmod"):
110 return None
111 if callable(self.lastmod):
112 try:
113 return max([self.lastmod(item) for item in self.items()], default=None)
114 except TypeError:
115 return None
116 else:
117 return self.lastmod
118
119 def _urls(self, page, protocol, domain):
120 urls = []

Callers 1

indexFunction · 0.45

Calls 3

itemsMethod · 0.95
callableFunction · 0.85
lastmodMethod · 0.45

Tested by

no test coverage detected