Prepare for html document validation (added wanted tags to tenant)

This commit is contained in:
Josako
2024-05-12 21:58:42 +02:00
parent 699de951e8
commit 011bdce38d
6 changed files with 146 additions and 45 deletions

View File

@@ -40,7 +40,7 @@ def add_document():
create_document_stack(form, file, filename, extension)
return redirect(url_for('document_bp/documents'))
return redirect(url_for('document_bp.documents'))
return render_template('document/add_document.html', form=form)

View File

@@ -21,6 +21,10 @@ class TenantForm(FlaskForm):
license_start_date = DateField('License Start Date', id='form-control datepicker', validators=[Optional()])
license_end_date = DateField('License End Date', id='form-control datepicker', validators=[Optional()])
allowed_monthly_interactions = IntegerField('Allowed Monthly Interactions', validators=[NumberRange(min=0)])
# Embedding variables
html_tags = StringField('HTML Tags', validators=[DataRequired(), Length(max=255)],
default='p, h1, h2, h3, h4, h5, h6, li')
submit = SubmitField('Submit')
def __init__(self, *args, **kwargs):