Ejemplo n.º 1
0
def music():
    bio = _fetch_bio()
    recordings = _fetch_recordings()
    urls = recordings.items.split(', ')
    return render_template('music.html',
                           tagline=bio.tagline,
                           urls=urls)
Ejemplo n.º 2
0
def save_recordings():
    form = RecordingsForm()
    if form.validate_on_submit():
        soundcloud_recordings = _fetch_recordings()
        soundcloud_recordings.items = ", ".join(form.soundcloud_urls.data)
        db.session.add(soundcloud_recordings)
        db.session.commit()
        return "Saved!"
    abort(400)
Ejemplo n.º 3
0
def recordings():
    soundcloud_recordings = _fetch_recordings()
    soundcloud_urls = soundcloud_recordings.items.split(", ")
    form = RecordingsForm(soundcloud_urls=soundcloud_urls)
    return render_template("admin/recordings.html", form=form)