Skip to content

Commit

Permalink
Sauts de ligne et fix d'un bloc contenant un opérateur logique
Browse files Browse the repository at this point in the history
  • Loading branch information
chloend committed Oct 3, 2024
1 parent 2373cfe commit 783502c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lemarche/www/pages/sitemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@
"2021-10-06-le-marche-fait-peau-neuve",
]


class FlatPageSitemap(Sitemap):
changefreq = "monthly"
priority = 0.6

def items(self):
return Page.objects.all()

Expand All @@ -24,6 +26,7 @@ def location(self, obj):
class StaticPageSitemap(Sitemap):
changefreq = "yearly"
priority = 0.4

def _is_included_view(self, callback):
"""
Check if a view has to be included in the sitemap.
Expand All @@ -36,8 +39,9 @@ def _is_included_view(self, callback):
HomeView, PageView, or SitemapView, False otherwise.
"""
return (
hasattr(callback, 'view_class') and
issubclass(callback.view_class, (ContactView, PageView, SitemapView))
hasattr(callback, 'view_class') and issubclass(
callback.view_class, (ContactView, PageView, SitemapView)
)
)

def items(self):
Expand Down

0 comments on commit 783502c

Please sign in to comment.