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 import current_app
|
||||||
from flask_wtf import FlaskForm
|
from flask_wtf import FlaskForm
|
||||||
from wtforms import (
|
from wtforms import (
|
||||||
StringField, PasswordField, BooleanField, SubmitField, TextAreaField,
|
StringField, BooleanField, SubmitField, TextAreaField,
|
||||||
IntegerField, SelectField, RadioField)
|
IntegerField, SelectField, RadioField)
|
||||||
from wtforms.validators import DataRequired, ValidationError, Optional
|
from wtforms.validators import DataRequired, ValidationError, Optional
|
||||||
from wtforms.widgets.html5 import NumberInput
|
from wtforms.widgets.html5 import NumberInput
|
||||||
|
@ -193,12 +193,6 @@ class LexiconConfigForm(FlaskForm):
|
||||||
# return True
|
# return True
|
||||||
|
|
||||||
|
|
||||||
class LexiconJoinForm(FlaskForm):
|
|
||||||
"""/lexicon/<name>/join/"""
|
|
||||||
password = StringField('Password')
|
|
||||||
submit = SubmitField('Submit')
|
|
||||||
|
|
||||||
|
|
||||||
class LexiconCharacterForm(FlaskForm):
|
class LexiconCharacterForm(FlaskForm):
|
||||||
"""/lexicon/<name>/session/character/"""
|
"""/lexicon/<name>/session/character/"""
|
||||||
characterName = StringField(
|
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.lexicon import player_can_join_lexicon, add_player_to_lexicon
|
||||||
from amanuensis.parser import filesafe_title
|
from amanuensis.parser import filesafe_title
|
||||||
from amanuensis.server.forms import LexiconJoinForm
|
|
||||||
from amanuensis.server.helpers import (
|
from amanuensis.server.helpers import (
|
||||||
lexicon_param,
|
lexicon_param,
|
||||||
player_required_if_not_public)
|
player_required_if_not_public)
|
||||||
|
|
||||||
|
from .forms import LexiconJoinForm
|
||||||
|
|
||||||
|
|
||||||
bp_lexicon = Blueprint('lexicon', __name__,
|
bp_lexicon = Blueprint('lexicon', __name__,
|
||||||
url_prefix='/lexicon/<name>',
|
url_prefix='/lexicon/<name>',
|
||||||
|
|
|
@ -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