Move join forms to server.lexicon
This commit is contained in:
parent
da236a83ba
commit
82129aba40
@ -1,7 +1,7 @@
|
||||
from flask import current_app
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import (
|
||||
StringField, PasswordField, BooleanField, SubmitField, TextAreaField,
|
||||
StringField, BooleanField, SubmitField, TextAreaField,
|
||||
IntegerField, SelectField, RadioField)
|
||||
from wtforms.validators import DataRequired, ValidationError, Optional
|
||||
from wtforms.widgets.html5 import NumberInput
|
||||
@ -193,12 +193,6 @@ class LexiconConfigForm(FlaskForm):
|
||||
# return True
|
||||
|
||||
|
||||
class LexiconJoinForm(FlaskForm):
|
||||
"""/lexicon/<name>/join/"""
|
||||
password = StringField('Password')
|
||||
submit = SubmitField('Submit')
|
||||
|
||||
|
||||
class LexiconCharacterForm(FlaskForm):
|
||||
"""/lexicon/<name>/session/character/"""
|
||||
characterName = StringField(
|
||||
|
@ -10,11 +10,12 @@ from flask_login import login_required, current_user
|
||||
|
||||
from amanuensis.lexicon import player_can_join_lexicon, add_player_to_lexicon
|
||||
from amanuensis.parser import filesafe_title
|
||||
from amanuensis.server.forms import LexiconJoinForm
|
||||
from amanuensis.server.helpers import (
|
||||
lexicon_param,
|
||||
player_required_if_not_public)
|
||||
|
||||
from .forms import LexiconJoinForm
|
||||
|
||||
|
||||
bp_lexicon = Blueprint('lexicon', __name__,
|
||||
url_prefix='/lexicon/<name>',
|
||||
|
8
amanuensis/server/lexicon/forms.py
Normal file
8
amanuensis/server/lexicon/forms.py
Normal file
@ -0,0 +1,8 @@
|
||||
from flask_wtf import FlaskForm
|
||||
from wtforms import StringField, SubmitField
|
||||
|
||||
|
||||
class LexiconJoinForm(FlaskForm):
|
||||
"""/lexicon/<name>/join/"""
|
||||
password = StringField('Password')
|
||||
submit = SubmitField('Submit')
|
Loading…
Reference in New Issue
Block a user