Esempio n. 1
0
def post_associated_file_by_historic_path(post_type, year, month, day,
                                          index, filename):
    post = Post.load_by_historic_path('{}/{}/{:02d}/{:02d}/{}'.format(
        post_type, year, month, day, index))
    if not post:
        abort(404)
    return redirect('/{}/files/{}'.format(post.path, filename))
Esempio n. 2
0
def post_associated_file_by_historic_path(post_type, year, month, day, index,
                                          filename):
    post = Post.load_by_historic_path('{}/{}/{:02d}/{:02d}/{}'.format(
        post_type, year, month, day, index))
    if not post:
        abort(404)
    return redirect('/{}/files/{}'.format(post.path, filename))
Esempio n. 3
0
def post_by_date(post_type, year, month, day, index, slug):
    post = Post.load_by_historic_path('{}/{}/{:02d}/{:02d}/{}'.format(
        post_type, year, month, day, index))
    if not post:
        abort(404)
    return redirect(post.permalink)
Esempio n. 4
0
def post_by_date(post_type, year, month, day, index, slug):
    post = Post.load_by_historic_path('{}/{}/{:02d}/{:02d}/{}'.format(
        post_type, year, month, day, index))
    if not post:
        abort(404)
    return redirect(post.permalink)