From 18457f9ced060ba2a24463760c425e12a8043145 Mon Sep 17 00:00:00 2001 From: crunk Date: Fri, 19 Apr 2024 22:33:52 +0200 Subject: [PATCH] late nite freaks --- README.md | 9 +++++++-- pyproject.toml | 38 +++++++++++++++++++------------------- requirements.txt | 1 - verse/forms/uploadform.py | 35 ++++++++++++++++++++--------------- 4 files changed, 46 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 877ef9d..f9fef6f 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,15 @@ The contribution consisted of setting up distribusi. ruruhuis.nl (distribusi is This particular work in progress project is an attempt to make distribusi into a webinterface that can be operated remotely without any knowlegde of CLI. Trying to somehow combine the ideas of distribusi with the ideas of a [tildeverse](https://tildeverse.org/) or [Tilde club ](https://tilde.club/), but also be neither of these ideas. -This project is made for Autonomous Practices at the WDKA in Rotterdam. +This project was made for Autonomous Practices at the WDKA in Rotterdam. + +The second stage of this project might be the archiving part of the [Toolsheds fellowship.](https://nieuweinstituut.nl/en/articles/call-for-fellows-tool-sheds) + + ## Work in progress -Amazingly helpful testers, currently I am writing some database upgrades and new functionalities, and they don't work, so have some patience with testing the in development material. +Currently this repo is transforming the academic based search filters into adjustable +small Autonomous space filters. ## Start your engines! diff --git a/pyproject.toml b/pyproject.toml index 27f62cd..9b286c9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,25 +1,25 @@ -[tool.black] -line-length = 79 -target-version = ['py37', 'py38', 'py39'] -include = '\.pyi?$' -exclude = ''' -/( - \.eggs - | \.git - | \.hg - | \.mypy_cache - | \.tox - | \.venv - | _build - | buck-out - | build - | dist - +[tool.black] +line-length = 79 +target-version = ['py311'] +include = '\.pyi?$' +exclude = ''' +/( + \.eggs + | \.git + | \.hg + | \.mypy_cache + | \.tox + | \.venv + | _build + | buck-out + | build + | dist + # The following are specific to Black, you probably don't want those. | blib2to3 - | tests/data + | tests/data | profiling )/ -''' +''' diff --git a/requirements.txt b/requirements.txt index bd1311a..fc2668f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -20,7 +20,6 @@ Flask-Security==3.0.0 Flask-Security-Too==4.1.3 Flask-SQLAlchemy==2.5.1 Flask-WTF==1.0.0 -greenlet==1.1.2 idna==3.3 itsdangerous==2.0.1 Jinja2==3.0.3 diff --git a/verse/forms/uploadform.py b/verse/forms/uploadform.py index 8f3e8da..c0df023 100644 --- a/verse/forms/uploadform.py +++ b/verse/forms/uploadform.py @@ -18,38 +18,43 @@ from wtforms import ( class UploadForm(FlaskForm): """File upload class for a new site in distribusi-verse""" - def distribusiname(form, field): + def _distribusiname(form, field): if field.data.lower() == "new": raise ValidationError("Name has to be unique and not just new.") sitename = StringField( - "Name of your website:", - validators=[validators.InputRequired(), Length(2, 100), distribusiname], + "Name of your archive section:", + validators=[validators.InputRequired(), Length(2, 100), _distribusiname], ) academicyear = SelectField( - "Academic year:", + "Year", validate_choice=True, coerce=str, choices=[ - (u'2021-2022', u'2021-2022'), - (u'2022-2023', u'2022-2023'), - (u'2023-2024', u'2023-2024'), - (u'2024-2025', u'2024-2025'), - (u'2020-2021', u'past: 2020-2021'), + (u'2017', u'2017'), + (u'2018', u'2018'), + (u'2019', u'2019'), + (u'2020', u'2020'), + (u'2021', u'2021'), + (u'2022', u'2022'), + (u'2023', u'2023'), + (u'2024', u'2024'), + (u'2025', u'2025'), ], option_widget=None, validators=[DataRequired()] ) term = SelectField( - "Term:", + "Category:", validate_choice=True, coerce=str, choices=[ - (u'1.2', u'1.2'), - (u'2.3', u'2.3'), - (u'3.1', u'3.1'), - (u'4.1', u'4.1'), - (u'4.2', u'4.2'), + (u'event', u'event'), + (u'gathering', u'gathering'), + (u'work session', u'work session'), + (u'workgroup', u'workgroup'), + (u'performance', u'performance'), + (u'music event', u'music event'), ], option_widget=None, validators=[DataRequired()]