From 5e202a83cee75785d74a55d1ddde1461e1b712af Mon Sep 17 00:00:00 2001 From: Tim Van Baak Date: Thu, 9 Sep 2021 18:10:05 -0700 Subject: [PATCH] Remove settings from old code that have been reintegrated into new code --- .../server/session/session.settings.jinja | 26 --------- amanuensis/server/session/settings.py | 57 ------------------- 2 files changed, 83 deletions(-) diff --git a/amanuensis/server/session/session.settings.jinja b/amanuensis/server/session/session.settings.jinja index a1395f8..56900c6 100644 --- a/amanuensis/server/session/session.settings.jinja +++ b/amanuensis/server/session/session.settings.jinja @@ -45,47 +45,21 @@

General

- {{ form.title.label }}:
- {{ form.title(autocomplete="off", size=32, style="width:100%") }}
{{ form.editor.label }}: {{ form.editor(autocomplete="off") }}
{% for error in form.editor.errors %} {{ error }}
{% endfor %} - {{ form.prompt.label }}: {{ form.prompt(class_="fullwidth") }} - {% for error in form.prompt.errors %} - {{ error }}
- {% endfor %}

Game Progress

{{ number_setting(form.turnCurrent) }} - {{ number_setting(form.turnMax) }} - {{ form.articleIndexList.label }}:
- {{ form.articleIndexList(class_="fullwidth", rows=10) }} - {% for error in form.articleIndexList.errors %} - {{ error }}
- {% endfor %} - {{ number_setting(form.articleIndexCapacity) }} {{ form.turnAssignment.label }}:
{{ form.turnAssignment(class_="fullwidth", rows=10) }}

-

Visibility and Joining

-

- {{ flag_setting(form.joinPublic) }} - {{ flag_setting(form.joinOpen) }} - {{ form.joinPassword(autocomplete="off") }} - {{ form.joinPassword.label }}
- {{ number_setting(form.joinMaxPlayers) }} - {{ number_setting(form.joinCharsPerPlayer) }} -

-

Turn Publishing

- {{ flag_setting(form.publishNotifyEditorOnReady) }} - {{ flag_setting(form.publishNotifyPlayerOnReject) }} - {{ flag_setting(form.publishNotifyPlayerOnAccept) }} {{ form.publishDeadlines(autocomplete="off") }} {{ form.publishDeadlines.label }}
{{ flag_setting(form.publishAsap) }} diff --git a/amanuensis/server/session/settings.py b/amanuensis/server/session/settings.py index ce1dd03..e37809e 100644 --- a/amanuensis/server/session/settings.py +++ b/amanuensis/server/session/settings.py @@ -158,65 +158,20 @@ class Settings(): if name.startswith('s_'): yield name, setting - s_title = Setting('title', - StringField('Title override', validators=[Optional()])) - s_editor = Setting('editor', SelectField('Editor', validators=[DataRequired(), User(True)]), translator=UsernameTranslator()) - s_prompt = Setting('prompt', - TextAreaField('Prompt', validators=[DataRequired()])) - s_turnCurrent = Setting('turn.current', IntegerField( 'Current turn', widget=NumberInput(), validators=[Optional()])) - s_turnMax = Setting('turn.max', - IntegerField( - 'Number of turns', - widget=NumberInput(), - validators=[DataRequired()])) - s_turnAssignment = Setting('turn.assignment', TextAreaField('index assignment raw'), translator=TmpAsgnTranslator()) - s_joinPublic = Setting('join.public', - BooleanField('Show game on public pages')) - - s_joinOpen = Setting('join.open', - BooleanField('Allow players to join game')) - - s_joinPassword = Setting('join.password', - StringField('Password to join game', validators=[Optional()])) - - s_joinMaxPlayers = Setting('join.max_players', - IntegerField( - 'Maximum number of players', - widget=NumberInput(), - validators=[DataRequired()])) - - s_joinCharsPerPlayer = Setting('join.chars_per_player', - IntegerField( - 'Characters per player', - widget=NumberInput(), - validators=[DataRequired()])) - - s_publishNotifyEditorOnReady = Setting('publish.notify_editor_on_ready', - BooleanField( - 'Notify the editor when a player marks an article as ready')) - - s_publishNotifyPlayerOnReject = Setting('publish.notify_player_on_reject', - BooleanField( - 'Notify a player when their article is rejected by the editor')) - - s_publishNotifyPlayerOnAccept = Setting('publish.notify_player_on_accept', - BooleanField( - 'Notify a player when their article is accepted by the editor')) - s_publishDeadlines = Setting('publish.deadlines', StringField( 'Turn deadline, as a crontab specification', @@ -236,18 +191,6 @@ class Settings(): BooleanField( 'Block turn publish if any articles are awaiting editor review')) - s_articleIndexList = Setting('article.index.list', - TextAreaField( - 'Index specifications', - validators=[IndexList]), - translator=IndexListTranslator()) - - s_articleIndexCapacity = Setting('article.index.capacity', - IntegerField( - 'Index capacity override', - widget=NumberInput(), - validators=[Optional()])) - s_articleCitationAllowSelf = Setting('article.citation.allow_self', BooleanField('Allow players to cite themselves'))