Merge app and project, use SQLite instead and
This commit is contained in:
parent
f0e7a35774
commit
4c16d14e61
29 changed files with 221 additions and 454 deletions
19
feedvault/sitemaps.py
Normal file
19
feedvault/sitemaps.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
from __future__ import annotations
|
||||
|
||||
from django.contrib.sitemaps import Sitemap
|
||||
from django.urls import reverse
|
||||
|
||||
|
||||
class StaticViewSitemap(Sitemap):
|
||||
"""Sitemap for static views."""
|
||||
|
||||
changefreq: str = "daily"
|
||||
priority: float = 0.5
|
||||
|
||||
def items(self: StaticViewSitemap) -> list[str]: # noqa: PLR6301
|
||||
"""Return all the items in the sitemap."""
|
||||
return ["feeds:index", "feeds:feeds", "feeds:domains"]
|
||||
|
||||
def location(self: StaticViewSitemap, item: str) -> str: # noqa: PLR6301
|
||||
"""Return the location of the item."""
|
||||
return reverse(item)
|
||||
Loading…
Add table
Add a link
Reference in a new issue