From d421e56e0924487861e6cf5300f462c9e66fd376 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Sun, 26 May 2024 20:47:03 +0100 Subject: Correctly handles the unique constraint on feature_slot --- .../resources/create_featured_resource.html | 35 ++++++++++++---------- 1 file changed, 20 insertions(+), 15 deletions(-) (limited to 'pyblackbird_cc/templates/resources') diff --git a/pyblackbird_cc/templates/resources/create_featured_resource.html b/pyblackbird_cc/templates/resources/create_featured_resource.html index e98b2ba..19022fc 100644 --- a/pyblackbird_cc/templates/resources/create_featured_resource.html +++ b/pyblackbird_cc/templates/resources/create_featured_resource.html @@ -1,21 +1,26 @@ {% extends "base.html" %} -{% load static %} -{% block title %}Add featured resource{% endblock title %} +{% load static %} +{% block title %} + Add featured resource +{% endblock title %} {% block content %} - -{% if request.user.is_authenticated and request.user.is_staff %} -
-
-

Configure featured resources

-

You can select three resources to be "featured" on the main page

+ {% if messages %} +
    + {% for message in messages %} +
  • {{ message }}
  • + {% endfor %} +
+ {% endif %} + {% if request.user.is_authenticated and request.user.is_staff %} +
+
+

Configure featured resources

+

You can select three resources to be "featured" on the main page

+
-
-{% else %} -

You must be a super-user to access this page.

-{% endif %} - - + {% else %} +

You must be a super-user to access this page.

+ {% endif %} {% endblock content %} - -- cgit v1.2.3