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, )
def banner(): if current_user.role != 'admin': return render_template('Admin/error-permission.html') list_banner = common.load_banner_image() return render_template( 'Admin/banner.html', banner_data=list_banner, #current_user = current_user, year=datetime.now().year, )
def refesh_banner(): list_banner = common.load_banner_image() return simplejson.dumps({'list_banner': list_banner})