diff --git a/bda/admin.py b/bda/admin.py index 37fdf9c7..e07a5d49 100644 --- a/bda/admin.py +++ b/bda/admin.py @@ -219,10 +219,10 @@ class SpectacleReventeAdmin(admin.ModelAdmin): list_display = ("spectacle", "seller", "date", "soldTo") raw_id_fields = ("attribution",) readonly_fields = ("shotgun", "expiration_time") - search_fields = ("spectacle__title", - "seller__user__username", - "seller__user__firstname", - "seller__user__lastname",) + search_fields = ['attribution__spectacle__title', + 'seller__user__username', + 'seller__user__first_name', + 'seller__user__last_name'] admin.site.register(CategorieSpectacle) diff --git a/bda/models.py b/bda/models.py index 3642ee83..d61f6b9b 100644 --- a/bda/models.py +++ b/bda/models.py @@ -228,7 +228,6 @@ class SpectacleRevente(models.Model): answered_mail = models.ManyToManyField(Participant, related_name="wanted", blank=True) - seller = models.ForeignKey(Participant, related_name="original_shows", verbose_name="Vendeur") diff --git a/bda/templates/liste-reventes.html b/bda/templates/liste-reventes.html index b9987497..d08d4010 100644 --- a/bda/templates/liste-reventes.html +++ b/bda/templates/liste-reventes.html @@ -11,7 +11,29 @@ {% endif %}
{% csrf_token %} - {{form | bootstrap}} +
+

Spectacles

+
+ + + +
+
    + {% for checkbox in form.spectacles %} +
  • {{checkbox}}
  • + {%endfor%} +
+
+
+ + {% endblock %}