Added project description

This commit is contained in:
Tris Forster 2020-10-05 14:43:28 +11:00
parent 8e50cf711e
commit f379dc9cc4
3 changed files with 21 additions and 1 deletions

View File

@ -0,0 +1,18 @@
# Generated by Django 3.1.1 on 2020-10-05 03:41
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('interface', '0020_auto_20201003_2103'),
]
operations = [
migrations.AddField(
model_name='project',
name='description',
field=models.TextField(blank=True),
),
]

View File

@ -45,6 +45,7 @@ class Ensemble(models.Model):
class Project(models.Model):
name = models.CharField(max_length=100)
ensemble = models.ForeignKey(Ensemble, related_name='projects', on_delete=models.CASCADE, null=True)
description = models.TextField(blank=True)
active = models.BooleanField(default=True)
deadline =models.DateField(null=True, blank=True)
owner = models.CharField(max_length=255, blank=True)

View File

@ -3,6 +3,7 @@
{% block page %}
<div class="narrow">
<h3 class="text-center">Due in {{ project.deadline|timeuntil }}!</h3>
<p>{{ project.description }}</p>
{% if project.owner %}
<p>Project email: <a href="mailto:{{ project.owner }}">{{ project.owner }}</a></p>
{% endif %}
@ -23,4 +24,4 @@
{% endif %}
{% endwith %}
</div>
{% endblock %}
{% endblock %}