1
0
Fork 0

Minor edits

This commit is contained in:
Shgck 2016-02-02 18:30:43 +01:00
parent 00c5782a6a
commit 9dbe41d825
5 changed files with 7 additions and 4 deletions

View file

@ -1,5 +1,6 @@
from django.contrib import admin from django.contrib import admin
from label.models import *
from label.models import Artist, Release
class ArtistAdmin(admin.ModelAdmin): class ArtistAdmin(admin.ModelAdmin):

View file

@ -6,6 +6,7 @@ from django.template.defaultfilters import slugify
class Artist(models.Model): class Artist(models.Model):
""" An Artist of the label. """ """ An Artist of the label. """
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")
@ -41,6 +42,7 @@ class Release(models.Model):
year: year of release year: year of release
cover: image file associated to this release cover: image file associated to this release
""" """
ident = models.IntegerField() ident = models.IntegerField()
title = models.CharField(max_length = 256) title = models.CharField(max_length = 256)
contributors = models.ManyToManyField(Artist) contributors = models.ManyToManyField(Artist)

View file

@ -21,4 +21,4 @@
{% endfor %} {% endfor %}
</p> </p>
{% endblock %} {% endblock %}

View file

@ -66,4 +66,4 @@
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View file

@ -37,4 +37,4 @@
{% endfor %} {% endfor %}
</table> </table>
{% endblock %} {% endblock %}