diff --git a/clubhaus/homepage/migrations/0025_setting_spotify_playlist_url.py b/clubhaus/homepage/migrations/0025_setting_spotify_playlist_url.py new file mode 100644 index 0000000..e922d0e --- /dev/null +++ b/clubhaus/homepage/migrations/0025_setting_spotify_playlist_url.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.2 on 2023-06-29 18:18 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('homepage', '0024_eventbackground_clubhausevent_background_picture'), + ] + + operations = [ + migrations.AddField( + model_name='setting', + name='spotify_playlist_url', + field=models.CharField(blank=True, help_text='The link to the Spotify playlist', max_length=500), + ), + ] diff --git a/clubhaus/homepage/models.py b/clubhaus/homepage/models.py index 12842a5..364ed27 100644 --- a/clubhaus/homepage/models.py +++ b/clubhaus/homepage/models.py @@ -85,6 +85,8 @@ class Setting(models.Model): intro_text = models.TextField(blank=True) intro_text_classes = models.CharField(max_length=500, default="text-center fs-5", blank=True, help_text="Extra CSS classes for the div for the intro text like text size") + spotify_playlist_url = models.CharField(max_length=500, blank=True, + help_text="The link to the Spotify playlist") class Meta: constraints = [ diff --git a/clubhaus/homepage/templates/homepage/base.html b/clubhaus/homepage/templates/homepage/base.html index 10aa43f..83e8c91 100644 --- a/clubhaus/homepage/templates/homepage/base.html +++ b/clubhaus/homepage/templates/homepage/base.html @@ -1,4 +1,6 @@ {% load static %} +{% load settings_tags %} +{% get_active_settings as settings %}
@@ -41,8 +43,8 @@ href="{% url 'index' %}">Home Event - Tobacco + Spotify diff --git a/clubhaus/homepage/templates/homepage/events.html b/clubhaus/homepage/templates/homepage/events.html index 501da16..c34b82b 100644 --- a/clubhaus/homepage/templates/homepage/events.html +++ b/clubhaus/homepage/templates/homepage/events.html @@ -72,8 +72,7 @@