diff --git a/label/models.py b/label/models.py index ee20b69..fd9aa9d 100644 --- a/label/models.py +++ b/label/models.py @@ -4,6 +4,8 @@ from django.dispatch.dispatcher import receiver from django.template.defaultfilters import slugify +ART_TYPES_HINT = "main roster (0), side project (1)" + class Artist(models.Model): """ An Artist of the label. """ @@ -14,6 +16,7 @@ class Artist(models.Model): url_soundcloud = models.URLField(blank = True) genre = models.CharField(max_length = 256) description = models.TextField(blank = True) + artist_type = models.IntegerField(default = 0, help_text = ART_TYPES_HINT) def __str__(self): return self.name diff --git a/label/templates/label/artists.html b/label/templates/label/artists.html index 44baef8..9df4f1c 100644 --- a/label/templates/label/artists.html +++ b/label/templates/label/artists.html @@ -9,17 +9,34 @@ {% block content %} -
-{% for artist in artists %}
-
-
-
- {{ artist.name }}
- {{ artist.genre }}
-
-
-{% endfor %}
+
+ {% for artist in artists %}
+ {% if artist.artist_type == 0 %}
+
+
+
+ {{ artist.name }}
+ {{ artist.genre }}
+
+
+ {% endif %}
+ {% endfor %}
+
+ {% for artist in artists %}
+ {% if artist.artist_type == 1 %}
+
+
+
+ {{ artist.name }}
+ {{ artist.genre }}
+
+
+ {% endif %}
+ {% endfor %}
+