示例#1
0
def music():
    bio = _fetch_bio()
    recordings = _fetch_recordings()
    urls = recordings.items.split(', ')
    return render_template('music.html',
                           tagline=bio.tagline,
                           urls=urls)
示例#2
0
def index():
    bio = _fetch_bio()
    gigs = _fetch_upcoming_gigs()
    short_bio_html = markdown.markdown(bio.short_bio)
    return render_template('index.html',
                           gigs=gigs,
                           tagline=bio.tagline,
                           short_bio=short_bio_html)
示例#3
0
def save_bio():
    form = BioForm()
    if form.validate_on_submit():
        bio = _fetch_bio()
        bio.tagline = form.tagline.data
        bio.short_bio = form.short_bio.data
        bio.long_bio = form.long_bio.data
        bio.bands = form.bands.data
        db.session.add(bio)
        db.session.commit()
        return "Saved!"
    abort(400)
示例#4
0
def bio():
    bio = _fetch_bio()
    form = BioForm(tagline=bio.tagline, short_bio=bio.short_bio, long_bio=bio.long_bio, bands=bio.bands)
    return render_template("admin/bio.html", form=form)
示例#5
0
def bands():
    bio = _fetch_bio()
    bands_html = markdown.markdown(bio.bands)
    return render_template('bands.html',
                           tagline=bio.tagline,
                           bands=bands_html)
示例#6
0
def gigs():
    bio = _fetch_bio()
    gigs = _fetch_gigs()
    return render_template('gigs.html',
                           gigs=gigs,
                           tagline=bio.tagline)
示例#7
0
def about():
    bio = _fetch_bio()
    long_bio_html = markdown.markdown(bio.long_bio)
    return render_template('about.html',
                           tagline=bio.tagline,
                           long_bio=long_bio_html)