Beispiel #1
0
def comic_thumbnail(comic):
    cb = comicbook(comic)
    if cb.thumbnail_path():
        basepath = os.path.join(app.root_path, '..', 'res', comic)
        return send_from_directory(basepath, cb.thumbnail_path())
    else:
        return send_from_directory(os.path.join(app.root_path, 'static'),
                                   'blank_thumbnail.gif', mimetype='image/gif')
Beispiel #2
0
def comic(comic):
    cb = comicbook(comic)
    return render_template("comic_index.html", comicbook=cb)
Beispiel #3
0
def comic_page(comic, f, ext):
    filename = f + '.' + ext
    cb = comicbook(comic, filename)
    basepath = os.path.join(app.root_path, '..', 'res', comic)
    page = os.path.join(basepath, filename)
    return render_template("comic_index.html", comicbook=cb, page=page)