diff --git a/app/interface/models.py b/app/interface/models.py index eba220e..4057bc1 100644 --- a/app/interface/models.py +++ b/app/interface/models.py @@ -61,7 +61,8 @@ class Ensemble(models.Model): ordering = ('slug', ) def active_projects(self): - return self.projects.filter(active=True, event_date__gte=timezone.now()) + #return self.projects.filter(active=True, event_date__gte=timezone.now()) + return self.projects.active().current() def has_admin(self, user): if not user.is_authenticated: @@ -132,6 +133,8 @@ class Project(models.Model): @property def rough_date(self): + if not self.event_date: + return "No timescale" in_past, s = rough_date(self.event_date) if in_past: return f"{s} ago" diff --git a/app/interface/templates/base.html b/app/interface/templates/base.html index bd9469c..577cb81 100644 --- a/app/interface/templates/base.html +++ b/app/interface/templates/base.html @@ -11,6 +11,7 @@ {% block title %}Polyphonic{% endblock %} {% block media %}{% endblock %} + diff --git a/app/interface/templates/interface/ensemble_detail.html b/app/interface/templates/interface/ensemble_detail.html index 973ebcb..68482d1 100644 --- a/app/interface/templates/interface/ensemble_detail.html +++ b/app/interface/templates/interface/ensemble_detail.html @@ -23,12 +23,12 @@

Projects for {{ensemble.name }}

{{ ensemble.details|markdown }}

-

Administrators

- +

{% include 'interface/project_items.html' %} diff --git a/app/interface/templates/interface/ensemble_list.html b/app/interface/templates/interface/ensemble_list.html index f51b04a..8f370ff 100644 --- a/app/interface/templates/interface/ensemble_list.html +++ b/app/interface/templates/interface/ensemble_list.html @@ -19,22 +19,18 @@
+
- Placeholder image + Placeholder image
- - {% if ensemble.details %} -
- {{ ensemble.details | markdown }} -
- {% endif %}