def show_edit(show): s = Show.query.get(show) if s is None: return 'no show found' # TODO: proper error page if request.args.get('inline'): template = '/shows/showform-inline.html' else: template = '/shows/showform.html' tags = [] for tag in s.tags: tags.append(tag.tag.name) return render_template(template, show={'name': s.name, 'description': s.description, 'series': s.series, 'users': s.users, 'tags': ",".join(tags), 'begin': to_user_timezone(s.begin).strftime('%s'), 'logo': s.logo, 'show': s.show, 'duration': (s.end - s.begin).total_seconds() / 60}, imgur={'client': CONFIG.get('site', 'imgur-client')}, format=get_datetime_format())
def show_edit(show): s = Show.query.get(show) if s is None: return "no show found" if request.args.get("inline"): template = "/shows/showform-inline.html" else: template = "/shows/showform.html" tags = [] for tag in s.tags: tags.append(tag.tag.name) return render_template( template, show={ "name": s.name, "description": s.description, "series": s.series, "users": s.users, "tags": ",".join(tags), "begin": to_user_timezone(s.begin).strftime("%s"), "logo": s.logo, "show": s.show, "duration": (s.end - s.begin).total_seconds() / 60, }, imgur={"client": CONFIG.get("site", "imgur-client")}, format=get_datetime_format(), )
def new_show_form(): if request.args.get('inline'): template = '/shows/showform-inline.html' else: template = '/shows/showform.html' return render_template(template, imgur={'client': CONFIG.get('site', 'imgur-client')}, format=get_datetime_format())
def new_show_form(): if request.args.get("inline"): template = "/shows/showform-inline.html" else: template = "/shows/showform.html" return render_template(template, imgur={"client": CONFIG.get("site", "imgur-client")}, format=get_datetime_format())