Beispiel #1
0
def slideshow_tag(tag):
    url = _ensure_api()
    if url: return flask.redirect(url)

    title = quorum.conf("TITLE", "Instashow")
    sub_title = quorum.conf("SUB_TITLE", "Instagram + steroids")
    image = quorum.conf("IMAGE", None)
    timeout = quorum.get_field("timeout", 10000, cast = int)
    title = quorum.get_field("title", title)
    sub_title = quorum.get_field("sub_title", sub_title)
    image = quorum.get_field("image", image)

    api = _get_api()
    media = api.media_tag(tag)

    return flask.render_template(
        "tags/slideshow.html.tpl",
        link = "tags",
        sub_link = "slideshow",
        tag = tag,
        media = media,
        title = title,
        sub_title = sub_title,
        image = image,
        timeout = timeout
    )
Beispiel #2
0
def list_photos():
    url = _ensure_api()
    if url: return flask.redirect(url)

    api = _get_api()
    media = api.media_tag("popular")

    return flask.render_template("photos/list.html.tpl",
                                 link="photos",
                                 id=id,
                                 media=media)
Beispiel #3
0
def show_photo(id):
    url = _ensure_api()
    if url: return flask.redirect(url)

    api = _get_api()
    media = api.get_media(id)

    return flask.render_template("photos/show.html.tpl",
                                 link="photos",
                                 sub_link="show",
                                 id=id,
                                 media=media)
Beispiel #4
0
def show_tag(tag):
    url = _ensure_api()
    if url: return flask.redirect(url)

    api = _get_api()
    media = api.media_tag(tag)

    return flask.render_template("tags/show.html.tpl",
                                 link="tags",
                                 sub_link="show",
                                 tag=tag,
                                 media=media)
Beispiel #5
0
def list_photos():
    url = _ensure_api()
    if url: return flask.redirect(url)

    api = _get_api()
    media = api.media_tag("popular")

    return flask.render_template(
        "photos/list.html.tpl",
        link = "photos",
        id = id,
        media = media
    )
Beispiel #6
0
def show_photo(id):
    url = _ensure_api()
    if url: return flask.redirect(url)

    api = _get_api()
    media = api.get_media(id)

    return flask.render_template(
        "photos/show.html.tpl",
        link = "photos",
        sub_link = "show",
        id = id,
        media = media
    )
Beispiel #7
0
def show_tag(tag):
    url = _ensure_api()
    if url: return flask.redirect(url)

    api = _get_api()
    media = api.media_tag(tag)

    return flask.render_template(
        "tags/show.html.tpl",
        link = "tags",
        sub_link = "show",
        tag = tag,
        media = media
    )
Beispiel #8
0
def slideshow_tag(tag):
    url = _ensure_api()
    if url: return flask.redirect(url)

    title = quorum.conf("TITLE", "Instashow")
    sub_title = quorum.conf("SUB_TITLE", "Instagram + steroids")
    image = quorum.conf("IMAGE", None)
    timeout = quorum.get_field("timeout", 10000, cast=int)
    title = quorum.get_field("title", title)
    sub_title = quorum.get_field("sub_title", sub_title)
    image = quorum.get_field("image", image)

    api = _get_api()
    media = api.media_tag(tag)

    return flask.render_template("tags/slideshow.html.tpl",
                                 link="tags",
                                 sub_link="slideshow",
                                 tag=tag,
                                 media=media,
                                 title=title,
                                 sub_title=sub_title,
                                 image=image,
                                 timeout=timeout)
Beispiel #9
0
def about():
    return flask.render_template("about.html.tpl", link="about")
Beispiel #10
0
def about():
    return flask.render_template(
        "about.html.tpl",
        link = "about"
    )