Beispiel #1
0
class TopicForm(UserModelForm):
    model_class = Topic

    name = fields.StringField(_('Name'), [validators.required()])
    description = fields.MarkdownField(_('Description'),
                                       [validators.required()])

    datasets = fields.DatasetListField(_('Associated datasets'))
    reuses = fields.ReuseListField(_('Associated reuses'))

    tags = fields.TagField(_('Tags'), [validators.required()])
    private = fields.BooleanField(_('Private'))
Beispiel #2
0
class TopicForm(ModelForm):
    model_class = Topic

    owner = fields.CurrentUserField()

    name = fields.StringField(_('Name'), [validators.DataRequired()])
    description = fields.MarkdownField(_('Description'),
                                       [validators.DataRequired()])

    datasets = fields.DatasetListField(_('Associated datasets'))
    reuses = fields.ReuseListField(_('Associated reuses'))

    tags = fields.TagField(_('Tags'), [validators.DataRequired()])
    private = fields.BooleanField(_('Private'))
    featured = fields.BooleanField(_('Featured'))
Beispiel #3
0
class PostForm(ModelForm):
    model_class = Post

    owner = fields.CurrentUserField()

    name = fields.StringField(_('Name'), [validators.DataRequired()])
    headline = fields.StringField(_('Headline'), widget=widgets.TextArea())
    content = fields.MarkdownField(_('Content'), [validators.DataRequired()])

    datasets = fields.DatasetListField(_('Associated datasets'))
    reuses = fields.ReuseListField(_('Associated reuses'))

    image = fields.ImageField(_('Image'), sizes=IMAGE_SIZES)
    credit_to = fields.StringField(_('Image credits'))
    credit_url = fields.URLField(_('Credit URL'))

    tags = fields.TagField(_('Tags'))
Beispiel #4
0
class PostForm(UserModelForm):
    model_class = Post

    name = fields.StringField(_('Name'), [validators.required()])
    headline = fields.StringField(_('Headline'), widget=widgets.TextArea())
    content = fields.MarkdownField(_('Content'), [validators.required()])

    datasets = fields.DatasetListField(_('Associated datasets'))
    reuses = fields.ReuseListField(_('Associated reuses'))

    image = fields.ImageField(_('Image'), sizes=IMAGE_SIZES)
    # image_url = fields.UploadableURLField(_('Image URL'), description=_('The post thumbnail'),
    #     endpoint='storage.add_image')
    credit_to = fields.StringField(_('Image credits'))
    credit_url = fields.URLField(_('Credit URL'))

    tags = fields.TagField(_('Tags'))

    private = fields.BooleanField(_('Private'))