Example #1
0
def band_thumbnail():
    if current_user.role != 'admin':
        return render_template('Admin/error-permission.html')
    list_band = common.load_band_thumbnail()
    return render_template('Admin/band-thumbnail.html',
                           band_data=list_band,
                           year=datetime.now().year)
Example #2
0
def home():
    #Load banner
    list_banner = common.load_banner_image()
    #Load event
    list_event = common.load_event_data('home')
    #Load band thumbnail
    list_band = common.load_band_thumbnail()
    #Load room thumbnail
    list_room_thumbnail = common.load_music_room_thumbnail('0')
    #Load room description
    list_room_description = common.load_music_room_description()
    #Load room general description
    list_room_general_description = common.load_room_general()
    #Load band general description
    list_band_general_description = common.load_band_general()
    """Renders the home page."""
    return render_template(
        'Home/home.html',
        title='Home Page',
        banner = list_banner,
        event = list_event,
        band_thumbnail = list_band,
        list_room_thumbnail = list_room_thumbnail,
        list_room_description = list_room_description,
        list_room_general_description = list_room_general_description,
        list_band_general_description = list_band_general_description,
        year=datetime.now().year,
    )
Example #3
0
def refesh_band_thumbnail():
    list_band = common.load_band_thumbnail()
    return simplejson.dumps({'list_band': list_band})