import os
import fnmatch
from backstage.config import PORTAL_SERVER, UPLOAD_PATH_MAP
from flask_wtf import FlaskForm
from flask_wtf.file import FileField, FileRequired, FileAllowed
from wtforms import StringField, SelectField
from wtforms.validators import DataRequired


selected_choices = [('home_aesthetics', '居家美學'),
                    ('room_planner_expertise', '規劃師QA'),
                    ('home_inspection_knowledge', '驗屋知識')]


class BlogCreateForm(FlaskForm):
    title = StringField('標題', validators=[DataRequired()])
    image = FileField('圖片', validators=[
        FileRequired(), FileAllowed(['jpg', 'png', 'gif', 'webp'], 'Images only!')])
    #categories = SelectField('主題類別', choices=selected_choices)
    categories = StringField('類別', validators=[DataRequired()])



    