-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update DJ Press 0.14 and include new sitemaps feature
- Loading branch information
1 parent
c1a967e
commit 908cca3
Showing
5 changed files
with
54 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
"""Sitemap for stuartm.nz.""" | ||
|
||
from django.contrib.sitemaps import Sitemap | ||
from django.urls import reverse | ||
|
||
|
||
class StaticSitemap(Sitemap): | ||
"""Sitemap for stuartm.nz.""" | ||
|
||
changefreq = "monthly" | ||
protocol = "https" | ||
|
||
def items(self) -> list: | ||
"""Return a list of URL names that you want to include.""" | ||
return [ | ||
"timezone_converter:converter", | ||
"markdown_editor:markdown_editor", | ||
"spf_generator:spf_generator", | ||
"home:home", | ||
] | ||
|
||
def location(self, item: str) -> str: | ||
"""Generate the URL for each item using Django's reverse.""" | ||
return reverse(item) | ||
|
||
def lastmod(self, _: dict) -> None: | ||
"""Return the last modification time for each item.""" | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.