diff options
author | 2021-03-24 14:28:45 +0800 | |
---|---|---|
committer | 2021-03-24 14:28:45 +0800 | |
commit | 19191bb1f45d14522a8de00b70feae2fc624e58a (patch) | |
tree | 31828820433a2bcc063822c9350e524546be9b23 /pydis_site/apps/content/views | |
parent | Improve variable and key names for page utils. (diff) |
Simplify pathlib code and specify file encoding.
Diffstat (limited to 'pydis_site/apps/content/views')
-rw-r--r-- | pydis_site/apps/content/views/page_category.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/pydis_site/apps/content/views/page_category.py b/pydis_site/apps/content/views/page_category.py index 0bef82d0..91aed7f0 100644 --- a/pydis_site/apps/content/views/page_category.py +++ b/pydis_site/apps/content/views/page_category.py @@ -50,12 +50,11 @@ class PageOrCategoryView(TemplateView): else: raise Http404 - breadcrumb_items = [ + context["breadcrumb_items"] = [ { "name": utils.get_category(settings.PAGES_PATH / location)["name"], "path": str(location) - } for location in self.location.parents + } for location in reversed(self.location.parents) ] - context["breadcrumb_items"] = reversed(breadcrumb_items) return context |