Commit 881fafe4 authored by kaiyou's avatar kaiyou

Remove some testing code

parent d315f80e
...@@ -3,8 +3,11 @@ app = Flask(__name__) ...@@ -3,8 +3,11 @@ app = Flask(__name__)
app.config.update( app.config.update(
SITE_NAME="TedImg", SITE_NAME="TedImg",
STORAGE_PATH="/tmp/images", FULL_STORAGE="/tmp/images",
WEB_PATH="/images", THUMB_STORAGE="/tmp/images/thumb",
FULL_WEB="image",
THUMB_WEB="images/thumb",
THUMB_SIZE=100
) )
import tedimg.views import tedimg.views
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
</head> </head>
<body> <body>
<nav class="blue" role="navigation"> <nav class="blue" role="navigation">
<div class="nav-wrapper container"><a href="/" class="brand-logo">TedImage</a> <div class="nav-wrapper container"><a href="/" class="brand-logo">{{ config["SITE_NAME"] }}</a>
<ul class="right"> <ul class="right">
<li><a href="#">Source code</a></li> <li><a href="#">Source code</a></li>
<li><a href="#">Help</a></li> <li><a href="#">Help</a></li>
......
...@@ -13,11 +13,7 @@ def index(): ...@@ -13,11 +13,7 @@ def index():
def show(path): def show(path):
root = flask.url_for("index", _external=True) root = flask.url_for("index", _external=True)
image, thumb = images.get_image(root, path) image, thumb = images.get_image(root, path)
return flask.render_template( return flask.render_template("show.html", image=image, thumb=thumb)
"show.html",
image=image, thumb=thumb,
thumb_size=app.config["THUMB_SIZE"]
)
@app.route('/upload', methods=['POST']) @app.route('/upload', methods=['POST'])
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment