Bug fixes from previous commit
This commit is contained in:
parent
b19bbfe905
commit
06e49a7760
|
@ -26,14 +26,13 @@ def index(request):
|
|||
pages = get_all_pages()
|
||||
|
||||
[requested_slug] = parse_qs(request.query).get("page", [""])
|
||||
print(requested_slug)
|
||||
requested_page = get_page(requested_slug)
|
||||
|
||||
thoughts = requested_page.get_all_entries()
|
||||
|
||||
rendered_text = render_to_string("thoughts/index.gmi", {
|
||||
"thoughts": thoughts,
|
||||
"first_page": requested_page == pages[0],
|
||||
"first_page": requested_page.slug == pages[0].slug,
|
||||
"pages": pages,
|
||||
"current_page_slug": requested_page.slug,
|
||||
})
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
|
||||
{% endfor %}
|
||||
|
||||
{% if not first_page %}{% for page in pages %}{% if page.slug == current_page_slug %}
|
||||
{% for page in pages %}{% if page.slug == current_page_slug %}
|
||||
### {{ page.formatted_name }}{% else %}
|
||||
=> /?page={{ page.slug }} {{ page.formatted_name }}{% endif %}{% endfor %}
|
||||
=> /search Search{% endif %}
|
||||
=> /search Search
|
||||
|
|
|
@ -49,7 +49,7 @@ def index(request):
|
|||
"authenticated": authenticated,
|
||||
"pages": pages,
|
||||
"current_page_slug": requested_page.slug,
|
||||
"first_page": requested_page == pages[0] # if you're viewing the first page
|
||||
"first_page": requested_page.slug == pages[0].slug # if you're viewing the first page
|
||||
})
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue