From 3acdfe5c194082192f43903c6296981c3c27c1b0 Mon Sep 17 00:00:00 2001
From: jaseg
Date: Sat, 28 Sep 2019 22:56:55 +0200
Subject: Fix empty template download
---
webapp/pogojig.py | 7 +
webapp/static/index.html | 10 +-
webapp/static/pogojig_template_empty.svg | 5464 ++++++++++++++++++++
.../static/pogojig_template_empty_pre_render.svg | 638 +++
4 files changed, 6114 insertions(+), 5 deletions(-)
create mode 100644 webapp/static/pogojig_template_empty.svg
create mode 100644 webapp/static/pogojig_template_empty_pre_render.svg
diff --git a/webapp/pogojig.py b/webapp/pogojig.py
index a7201d0..e2b1b47 100644
--- a/webapp/pogojig.py
+++ b/webapp/pogojig.py
@@ -100,6 +100,13 @@ def render_download():
as_attachment=True,
attachment_filename=f'{path.splitext(session["filename"])[0]}_pogojig.zip')
+@app.route('/pogojig_template_empty.svg')
+def static_template():
+ return send_file('static/pogojig_template_empty.svg',
+ mimetype='application/octet-stream',
+ as_attachment=True,
+ attachment_filename='pogojig_template_empty.svg')
+
@app.route('/session_reset', methods=['POST'])
@require_session_id
def session_reset():
diff --git a/webapp/static/index.html b/webapp/static/index.html
index 586f64d..e26649f 100644
--- a/webapp/static/index.html
+++ b/webapp/static/index.html
@@ -17,8 +17,8 @@
PCB project for a pogo pin breakout and mounting PCB.
You can start with either Gerber files exported from any PCB toolchain, or you can do a free-form layout using
- the static Inkscape SVG template if you
- wan to work from construction drawings, scanned or photographed PCBs etc.
+ the static Inkscape SVG template if you
+ want to work from construction drawings, scanned or photographed PCBs etc.
@@ -26,11 +26,11 @@
1. Convert your Gerbers to an SVG template and draw pogo pins, mounting holes and cutouts
into the template. Don't have gerbers? Start with an
- empty template.
+ empty template.