Added composer field
This commit is contained in:
parent
f50fe11ced
commit
7aedc6bd07
@ -5,7 +5,13 @@
|
||||
{% block page %}
|
||||
<div class="narrow">
|
||||
{% if project.event_date %}
|
||||
<h3 class="text-center">{{ project.when }}</h3>
|
||||
<h3 class="text-center">
|
||||
{% if project.has_happened %}
|
||||
{{ project.event_date|timesince }}
|
||||
{% else %}
|
||||
{{ project.event_date|}}
|
||||
{% endif %}
|
||||
</h3>
|
||||
{% endif %}
|
||||
|
||||
<p>{{ project.description|markdown }}</p>
|
||||
|
||||
@ -10,7 +10,7 @@ class ItemInline(admin.TabularInline):
|
||||
model = models.Item
|
||||
|
||||
class WorkAdmin(admin.ModelAdmin):
|
||||
list_display = ['name', 'orchestration']
|
||||
list_display = ['name', 'composer', 'orchestration']
|
||||
list_filter = ['ensemble']
|
||||
inlines = [ItemInline]
|
||||
|
||||
|
||||
18
library/migrations/0004_work_composer.py
Normal file
18
library/migrations/0004_work_composer.py
Normal file
@ -0,0 +1,18 @@
|
||||
# Generated by Django 3.1.1 on 2021-03-22 23:47
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('library', '0003_orchestrations'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='work',
|
||||
name='composer',
|
||||
field=models.CharField(blank=True, max_length=255),
|
||||
),
|
||||
]
|
||||
@ -78,6 +78,7 @@ class Work(models.Model):
|
||||
ensemble = models.ForeignKey('interface.Ensemble', on_delete=models.CASCADE, related_name="works")
|
||||
slug = models.SlugField(max_length=100, editable=False)
|
||||
name = models.CharField(max_length=255)
|
||||
composer = models.CharField(max_length=255, blank=True)
|
||||
orchestration = models.ForeignKey(Orchestration, null=True, on_delete=models.SET_NULL, related_name='works')
|
||||
running_time = models.IntegerField(null=True, blank=True)
|
||||
notes = models.TextField(blank=True)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user