示例#1
0
def ui_new_music():
    # Declare the table
    class ItemTable(Table):
        id = Col('id')
        name = Col('name')
        title = Col('title')
        artist = Col('artist')
        channel = Col('channel')
        new = Col('new')
        # Add edit button
        edit = LinkCol('Edit', 'ui_edit_music', url_kwargs=dict(identifier='id'))

    # Get some data
    data = Controller.get_new_music()
    # Populate the table
    table = ItemTable(data)
    # Render html
    return render_template("music/new_music.html", table=table)
示例#2
0
 def get():
     return {'message': 'Success', 'data': Controller.get_new_music()}, 200