# Path: pjuu/posts/backend.py
# MAX_POST_LENGTH = 500
# 
# Path: pjuu/lib/parser.py
# URL_RE = re.compile(URL_RE_PATTERN)


from flask_wtf import FlaskForm
from flask_wtf.file import FileAllowed, FileField
from wtforms import (
    BooleanField, TextAreaField, SelectField, StringField, RadioField
)
from wtforms.validators import Length, Optional, Regexp
from pjuu.posts.backend import MAX_POST_LENGTH
from pjuu.lib.parser import URL_RE
    """This is the form used to update your about information"""
    upload = FileField('Upload', [
        FileAllowed(['gif', 'jpg', 'jpeg', 'png'],
                    'Only "gif", "jpg", "jpeg" and "png" files are supported')
    ])

    hide_feed_images = BooleanField('Hide images in feeds')

    choices = [('25', '25'), ('50', '50'), ('100', '100')]

    feed_pagination_size = SelectField('Number of feed items to show',
                                       choices=choices, default=25)
    replies_pagination_size = SelectField('Number of replies to show',
                                          choices=choices, default=25)
    alerts_pagination_size = SelectField('Number of alerts to show',
                                         choices=choices, default=50)

    reply_sort_order = BooleanField('Show replies in chronological order')

    homepage = StringField('Home page', [
        Regexp(URL_RE,
               message='Please ensure the home page is a valid URL or empty'),
        Optional()
    ])

    location = StringField('Location', [Optional()])

    about = TextAreaField('About', [
        Length(max=MAX_POST_LENGTH,
               message='About can not be larger than '

# Path: pjuu/posts/backend.py
# MAX_POST_LENGTH = 500
# 
# Path: pjuu/lib/parser.py
# URL_RE = re.compile(URL_RE_PATTERN)


# Path: pjuu/users/forms.py
from flask_wtf import FlaskForm
from flask_wtf.file import FileAllowed, FileField
from wtforms import (
    BooleanField, TextAreaField, SelectField, StringField, RadioField
)
from wtforms.validators import Length, Optional, Regexp
from pjuu.posts.backend import MAX_POST_LENGTH
from pjuu.lib.parser import URL_RE

    """This is the form used to update your about information"""
    upload = FileField('Upload', [
        FileAllowed(['gif', 'jpg', 'jpeg', 'png'],
                    'Only "gif", "jpg", "jpeg" and "png" files are supported')
    ])

    hide_feed_images = BooleanField('Hide images in feeds')

    choices = [('25', '25'), ('50', '50'), ('100', '100')]

    feed_pagination_size = SelectField('Number of feed items to show',
                                       choices=choices, default=25)
    replies_pagination_size = SelectField('Number of replies to show',
                                          choices=choices, default=25)
    alerts_pagination_size = SelectField('Number of alerts to show',
                                         choices=choices, default=50)

    reply_sort_order = BooleanField('Show replies in chronological order')

    homepage = StringField('Home page', [
        Regexp(URL_RE,
               message='Please ensure the home page is a valid URL or empty'),
        Optional()
    ])

    location = StringField('Location', [Optional()])

    about = TextAreaField('About', [
        Length(max=MAX_POST_LENGTH,
               message='About can not be larger than '

                       '{} characters'.format(MAX_POST_LENGTH))