Last active
December 12, 2015 04:28
-
-
Save moschlar/4714146 to your computer and use it in GitHub Desktop.
Customize sprox dropdown menus
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Genre(DeclarativeBase): | |
__tablename__ = "genres" | |
genre_id = Column(Integer, primary_key=True) | |
name = Column(String(100)) | |
description = Column(String(200)) | |
@property | |
def _name(self): | |
return '%s (%s)' % (self.name, self.description) | |
class NewMovieForm(AddRecordForm): | |
__model__ = Movie | |
__omit_fields__ = ['movie_id', 'genre_id'] | |
__field_order__ = ['title', 'description', 'genre', 'directors'] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment