Mercurial > odfcast
changeset 18:585904e7411a
Add html for converting a odf with a template
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 29 Sep 2014 14:18:11 +0200 |
parents | 75d5d18e7d52 |
children | 2f627039d2b4 |
files | odfcast/convert.py templates/template_convert.html |
diffstat | 2 files changed, 24 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/odfcast/convert.py Mon Sep 29 14:17:41 2014 +0200 +++ b/odfcast/convert.py Mon Sep 29 14:18:11 2014 +0200 @@ -89,3 +89,6 @@ def get_datadict(self): vars = request.form['datadict'] return json.loads(vars) + + def get(self): + return render_template("template_convert.html")
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/templates/template_convert.html Mon Sep 29 14:18:11 2014 +0200 @@ -0,0 +1,21 @@ +{% extends 'base.html' %} + +{% block content %} +<h1>Template Convert</h1> + +<form role="form" action="" method="POST" enctype="multipart/form-data"> + <div class="form-group"> + <label for="format">Format</label> + <input id="format" type="text" placeholder="Format" name="format" class="form-control"> + </div> + <div class="form-group"> + <label for="datadict">Data in JSON Format</label> + <textarea id="datadict" class="form-control"></textarea> + </div> + <div class="form-group"> + <label for="file" >File</label> + <input id="file" type="file" name="file"> + </div> + <button class="btn btn-default" type="submit">Convert</button> +</form> +{% endblock %}