aboutsummaryrefslogtreecommitdiffstats
path: root/pyblackbird_cc
diff options
context:
space:
mode:
authorMatthew Lemon <y@yulqen.org>2024-05-26 14:41:07 +0100
committerMatthew Lemon <y@yulqen.org>2024-05-26 14:41:07 +0100
commiteeaa3c469b33e614941596a04d56af3be1290456 (patch)
tree8013fedc5ea9a39557a3f8e287320ae6c14184ac /pyblackbird_cc
parentfda2c61fab80cbb8733dcbe32a061785c67b18a4 (diff)
wip: create form now as a feature field
Diffstat (limited to 'pyblackbird_cc')
-rw-r--r--pyblackbird_cc/resources/forms.py7
-rw-r--r--pyblackbird_cc/resources/tests/test_forms.py1
2 files changed, 6 insertions, 2 deletions
diff --git a/pyblackbird_cc/resources/forms.py b/pyblackbird_cc/resources/forms.py
index b8b638c..9320a77 100644
--- a/pyblackbird_cc/resources/forms.py
+++ b/pyblackbird_cc/resources/forms.py
@@ -102,7 +102,12 @@ class ResourceCreateForm(forms.Form):
)
pdf_files.widget.attrs.update({"class": "file_upload", "accept": ".pdf"})
thumbnail_files.widget.attrs.update({"class": "file_upload", "accept": ".png,.jpg"})
- feature_slot = forms.IntegerField(min_value=1, max_value=3, required=False)
+ feature_slot = forms.IntegerField(
+ min_value=1,
+ max_value=3,
+ required=False,
+ help_text="Please enter either 1, 2 or 3 here. This will dictate where on the page this resource will feature on the main list page.",
+ )
def clean_thumbnail_files(self):
thumbnail_files = self.files.getlist("thumbnail_files")
diff --git a/pyblackbird_cc/resources/tests/test_forms.py b/pyblackbird_cc/resources/tests/test_forms.py
index e19784f..cea3540 100644
--- a/pyblackbird_cc/resources/tests/test_forms.py
+++ b/pyblackbird_cc/resources/tests/test_forms.py
@@ -71,5 +71,4 @@ class ResourceCreateFormTest(TestCase):
"main_resource_category": self.resource_category.id,
}
form = ResourceCreateForm(data=form_data, files=self.form_files)
- breakpoint()
assert not form.is_valid()