From b30705445328078855b371a6f85076d7a6ff34c1 Mon Sep 17 00:00:00 2001 From: Colin Powell Date: Wed, 8 Mar 2023 12:45:30 -0500 Subject: [PATCH] Update long play templates, remove chart --- vrobbler/apps/scrobbles/views.py | 3 +- vrobbler/settings.py | 4 +-- vrobbler/templates/base.html | 4 +-- vrobbler/templates/books/book_detail.html | 10 ++++++- .../scrobbles/long_plays_in_progress.html | 28 +++++++++++-------- .../templates/scrobbles/scrobble_list.html | 8 ++---- .../videogames/videogame_detail.html | 14 ++++++++-- 7 files changed, 44 insertions(+), 27 deletions(-) diff --git a/vrobbler/apps/scrobbles/views.py b/vrobbler/apps/scrobbles/views.py index 19dca3f..d5bc89b 100644 --- a/vrobbler/apps/scrobbles/views.py +++ b/vrobbler/apps/scrobbles/views.py @@ -118,7 +118,7 @@ class RecentScrobbleList(ListView): "all": list(live_charts(**track)), } - data["weekly_data"] = week_of_scrobbles(user=user) + # data["weekly_data"] = week_of_scrobbles(user=user) data["counts"] = scrobble_counts(user) data["imdb_form"] = ScrobbleForm data["export_form"] = ExportScrobbleForm @@ -135,6 +135,7 @@ class ScrobbleLongPlaysView(TemplateView): def get_context_data(self, **kwargs): context_data = super().get_context_data(**kwargs) + context_data["view"] = self.request.GET.get("view", "grid") context_data["in_progress"] = get_long_plays_in_progress( self.request.user ) diff --git a/vrobbler/settings.py b/vrobbler/settings.py index c16d789..eb439e4 100644 --- a/vrobbler/settings.py +++ b/vrobbler/settings.py @@ -234,11 +234,11 @@ USE_TZ = True # Static files (CSS, JavaScript, Images) # https://docs.djangoproject.com/en/3.1/howto/static-files/ -STATIC_URL = "/static/" +STATIC_URL = os.getenv("VROBBLER_STATIC_URL", "/static/") STATIC_ROOT = os.getenv( "VROBBLER_STATIC_ROOT", os.path.join(PROJECT_ROOT, "static") ) -MEDIA_URL = "/media/" +MEDIA_URL = os.getenv("VROBBLER_MEDIA_URL", "/media/") MEDIA_ROOT = os.getenv( "VROBBLER_MEDIA_ROOT", os.path.join(PROJECT_ROOT, "media") ) diff --git a/vrobbler/templates/base.html b/vrobbler/templates/base.html index a6e2728..05386ad 100644 --- a/vrobbler/templates/base.html +++ b/vrobbler/templates/base.html @@ -13,7 +13,6 @@ -