excel records download on the about page

This commit is contained in:
admin committed 2026-10-23 17:41:07 -04:00
1 parent 0462af758d
commit ef1b423edc
4 files changed
+8 -2

No files matched your search

+1
View File
@@ -9,5 +9,6 @@ urlpatterns = [
path('about/', views.about, name="about"),
path('links/', views.links, name="links"),
path('links/modpack', views.zipdownload, name="zipdownload"),
path('about/records', views.recordsdownload, name="recordsdownload"),
path('robots.txt', TemplateView.as_view(template_name="robots.txt", content_type="text/plain") , name='robots.txt'),
]
+5
View File
@@ -27,6 +27,11 @@ def zipdownload(request):
file_path = os.path.join(settings.STATIC_ROOT, 'files', 'mods.zip')
return FileResponse(open(file_path, 'rb'), as_attachment=True, filename='mods.zip')
def recordsdownload(request):
# excel records zip, rebuilt every night by ~/scripts/build_records_zip.py
file_path = os.path.join(settings.STATIC_ROOT, 'files', 'wvlottopy_records.zip')
return FileResponse(open(file_path, 'rb'), as_attachment=True, filename='wvlottopy_records.zip')
@cache_page(CACHE_TTL)
def home(request):
context = {