def sng_impressions(id, form=None): if form is None: form = ImpressionForm() return render_template("songimpressions.html", impressions=database.get_impressions(id), song=database.get_song_by_id(id), rating=database.get_song_rating(id), form=form)
def sng_impressions(id, form=None): if form is None: form = ImpressionForm() if can_see_submissions(): impressions = database.get_impressions(id) sng = database.get_song_by_id(id) return render_template("song_impressions.html", impressions=impressions, song=sng, rating=database.get_song_rating(id), form=form, impression_count=len(impressions), is_impression_period=are_impressions_open()) else: return render_template("section_closed.html")