def __init__(self, records, precedent, *args, **kwargs):
#only_csrf = MultiDict([('csrf_token', precedent.get('csrf_token'))])
#super(FlaskForm, self).__init__(only_csrf, *args, **kwargs)
super(FlaskForm, self).__init__(precedent, *args, **kwargs)
genres_choices = [(x, x) for x in records.genres]
no_genres_choices = genres_choices
self.genres.choices = genres_choices
self.no_genres.choices = no_genres_choices
artists_choices = [(x, x) for x in records.artists]
self.artists.choices = artists_choices
self.no_artists.choices = artists_choices
keywords_choices = [(x, x) for x in records.keywords]
self.keywords.choices = keywords_choices
self.no_keywords.choices = keywords_choices
titles_choices = [(x, x) for x in records.titles]
self.titles.choices = titles_choices
self.no_titles.choices = titles_choices
albums_choices = [(x, x) for x in records.albums]
self.albums.choices = albums_choices
self.no_albums.choices = albums_choices
评论列表
文章目录