1
0
Fork 0

Minor changes

This commit is contained in:
Dece 2017-08-17 15:52:09 +02:00
parent fb1443525a
commit 93b56900ad
3 changed files with 11 additions and 11 deletions

View file

@ -4,22 +4,21 @@ from django.dispatch.dispatcher import receiver
from django.template.defaultfilters import slugify from django.template.defaultfilters import slugify
ART_GENRE_HINT = 'lowercase please!'
ART_DESC_HINT = 'Markdown or HTML formatting supported'
ART_TYPES_HINT = 'main roster (0), side project (1)'
class Artist(models.Model): class Artist(models.Model):
""" An Artist of the label. """ """ An Artist of the label. """
GENRE_HINT = 'lowercase please!'
DESC_HINT = 'Markdown or HTML formatting supported'
TYPE_HINT = 'main roster (0), side project (1)'
name = models.CharField(max_length=64) name = models.CharField(max_length=64)
slug = models.SlugField() slug = models.SlugField()
image = models.ImageField(upload_to='artists') image = models.ImageField(upload_to='artists')
url_bandcamp = models.URLField(blank=True) url_bandcamp = models.URLField(blank=True)
url_soundcloud = models.URLField(blank=True) url_soundcloud = models.URLField(blank=True)
genre = models.CharField(max_length=256, help_text=ART_GENRE_HINT) genre = models.CharField(max_length=256, help_text=GENRE_HINT)
description = models.TextField(blank=True, help_text=ART_DESC_HINT) description = models.TextField(blank=True, help_text=DESC_HINT)
artist_type = models.IntegerField(default=0, help_text=ART_TYPES_HINT) artist_type = models.IntegerField(default=0, help_text=TYPE_HINT)
def __str__(self): def __str__(self):
return self.name return self.name
@ -28,7 +27,7 @@ class Artist(models.Model):
ordering = ('name',) ordering = ('name',)
@receiver(pre_save, sender = Artist) @receiver(pre_save, sender=Artist)
def _artist_pre_save(sender, instance, **kwargs): def _artist_pre_save(sender, instance, **kwargs):
instance.slug = slugify(instance.name) instance.slug = slugify(instance.name)

View file

@ -8,6 +8,7 @@
max-width: 300px; max-width: 300px;
max-height: 300px; max-height: 300px;
border-radius: 5px; border-radius: 5px;
background-color: white;
} }
.minilogo { .minilogo {

View file

@ -9,8 +9,8 @@ to harsh noise, with chiptunes and post-metal. More than anything it's a
community of friends with common interests, that happens to produce a lot of community of friends with common interests, that happens to produce a lot of
music.</p> music.</p>
<p>We do not sell physical copies but feel free to contact us if you really feel <p>We do not often produce physical releases but feel free to contact us if you
that we should. *&lt;B^)</p> really feel that we should. *&lt;B^)</p>
<div style="text-align: center;"> <div style="text-align: center;">
<img src="/static/img/logo.png" alt="logo" style="max-width: 200px" /> <img src="/static/img/logo.png" alt="logo" style="max-width: 200px" />