fix public index missing template context

This commit is contained in:
Nick Sweeting 2020-11-28 01:29:34 -05:00
parent 7d7ce3a790
commit fde65c3b7d
3 changed files with 14 additions and 6 deletions

View file

@ -19,7 +19,9 @@ from ..config import (
OUTPUT_DIR,
PUBLIC_INDEX,
PUBLIC_SNAPSHOTS,
PUBLIC_ADD_VIEW
PUBLIC_ADD_VIEW,
VERSION,
FOOTER_INFO,
)
from main import add
from ..util import base_url, ansi_to_html
@ -93,6 +95,13 @@ class PublicArchiveView(ListView):
model = Snapshot
paginate_by = 100
def get_context_data(self, **kwargs):
return {
**super().get_context_data(**kwargs),
'VERSION': VERSION,
'FOOTER_INFO': FOOTER_INFO,
}
def get_queryset(self, **kwargs):
qs = super().get_queryset(**kwargs)
query = self.request.GET.get('q')

View file

@ -271,10 +271,9 @@
<br />
<center>
<small>
Archive created using <a href="https://github.com/ArchiveBox/ArchiveBox" title="Github">ArchiveBox</a> &nbsp; |
&nbsp;
Download index as <a href="index.json" title="JSON summary of archived links.">JSON</a>
<br /><br />
Archive created using <a href="https://github.com/ArchiveBox/ArchiveBox" title="Github">ArchiveBox</a> version
<a href="https://github.com/ArchiveBox/ArchiveBox/releases" title="Releases">v{{VERSION}}</a>.
<br/><br/>
{{FOOTER_INFO}}
</small>
</center>

View file

@ -204,7 +204,7 @@
<center>
<small>
Created using <a href="https://github.com/ArchiveBox/ArchiveBox" title="Github">ArchiveBox</a>
version <a href="https://github.com/ArchiveBox/ArchiveBox/tree/v$version" title="Git commit">v$version</a>.
version <a href="https://github.com/ArchiveBox/ArchiveBox/releases" title="Releases">v$version</a>.
<br/><br/>
$footer_info
</small>