Skip to content

Commit

Permalink
remove Sitemap model and view (not used anymore)
Browse files Browse the repository at this point in the history
  • Loading branch information
Clément committed Jul 18, 2024
1 parent 613ebbb commit 08980af
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
6 changes: 0 additions & 6 deletions jssg/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,6 @@ def load_glob(
def get_posts(cls) :
return ({"slug": p.slug} if p.rel_folder_path == '' else {"dir": p.rel_folder_path, "slug" : p.slug} for p in Post.load_glob(all = True))

class Sitemap :
BASE_DIR = settings.JFME_PAGES_DIRS + settings.JFME_POSTS_DIRS
domain = settings.JFME_DOMAIN
pages_slugs = [p["slug"] for p in Page.get_pages()]
posts_slugs = [p["slug"] for p in Post.get_posts()]

class PostList :
metadata = {"page_header_h1":"Posts"}
category = ""
Expand Down
9 changes: 1 addition & 8 deletions jssg/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
from django.utils.feedgenerator import Atom1Feed
from django.views.generic import DetailView

from jssg.models import Page, Post, Sitemap, PostList
from jssg.models import Page, Post, PostList


class PostFeedsView(Feed):
Expand Down Expand Up @@ -72,13 +72,6 @@ class PostView(PageView):
model = Post
template_name = "post.html"


class SitemapView(DetailView) :
model = Sitemap
template_name = "sitemap.html"

def get_object(self, queryset=None) -> Model:
return self.model()

class PostListView(DetailView):
template_name = "post-list.html"
Expand Down

0 comments on commit 08980af

Please sign in to comment.