summaryrefslogtreecommitdiff
path: root/app/views
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.net>2013-09-14 01:01:34 +0200
committerRené 'Necoro' Neumann <necoro@necoro.net>2013-09-14 01:01:34 +0200
commit1ede4ab8dcf23a789938054e46225309c46a6fa3 (patch)
tree5eb287897f196500cc8593d67a14590193db53b4 /app/views
parent4561ac0e95da990caf42bebaac7d3ca48deb53ce (diff)
downloadkosten-1ede4ab8dcf23a789938054e46225309c46a6fa3.tar.gz
kosten-1ede4ab8dcf23a789938054e46225309c46a6fa3.tar.bz2
kosten-1ede4ab8dcf23a789938054e46225309c46a6fa3.zip
Remove python SVG stuff
Diffstat (limited to 'app/views')
-rw-r--r--app/views/__init__.py3
-rw-r--r--app/views/svg.py43
2 files changed, 1 insertions, 45 deletions
diff --git a/app/views/__init__.py b/app/views/__init__.py
index c4c362b..308fdf8 100644
--- a/app/views/__init__.py
+++ b/app/views/__init__.py
@@ -33,11 +33,10 @@ def format_date(s, format="%Y/%m"):
def page_not_found (error):
return render_template("404.jinja", page = request.path), 404
-from . import categories, consts, expenses, svg
+from . import categories, consts, expenses
app.register_blueprint(expenses.mod)
app.register_blueprint(consts.mod, url_prefix="/const")
app.register_blueprint(categories.mod, url_prefix="/cat")
-app.register_blueprint(svg.mod, url_prefix="/svg")
app.add_url_rule("/", endpoint = "index", build_only = True)
diff --git a/app/views/svg.py b/app/views/svg.py
deleted file mode 100644
index 06666b3..0000000
--- a/app/views/svg.py
+++ /dev/null
@@ -1,43 +0,0 @@
-from ..flask_extend import Blueprint
-
-from .expenses import calc_month_exp
-from . import static_url
-from ..model import Category
-
-from pygal.style import DefaultStyle as Style
-from pygal import Pie as _Pie
-
-mod = Blueprint('svg', __name__)
-
-Style.background = Style.plot_background = "rgba(255,0,0,0)"
-
-def Pie(*args, **kwargs):
- # does not work as functools.partial, because static_url would be called without request
- return _Pie(*args,
- style=Style,
- js = [static_url('pygal/pygal.js', _external = True)],
- legend_font_size = 24,
- tooltip_font_size = 24,
- value_font_size = 24,
- margin = 0,
- legend_at_bottom = True,
- pretty_print = True,
- **kwargs)
-
-@mod.route("/month/<int(fixed_digits=4):year>/<int(fixed_digits=2):month>.svg")
-def month(year, month):
- exp = calc_month_exp(year, month)
- pie = Pie()
-
- expenses = {}
- for c in exp.catexps:
- expenses[c.cat.name] = float(c.expense)
-
- for c in Category.query.order_by(Category.name).all():
- pie.add(c.name, expenses.get(c.name, 0.0))
-
- if not expenses:
- pie.raw_series = []
- pie.add("Empty", 0.1)
-
- return pie.render_response()
emplate.go?id=7bfe97f3e72279a17c16803d64a16beb55944332&follow=1'>Fix html templateRené 'Necoro' Neumann2-3/+11 2020-04-22Concurrent feed processing; central imap handlerRené 'Necoro' Neumann6-31/+161 2020-04-22Revert to the now patched version of go-messageRené 'Necoro' Neumann2-5/+4 2020-04-22Use patched version of go-messageRené 'Necoro' Neumann3-10/+5 2020-04-21Update README.mdRené 'Necoro' Neumann1-0/+2 2020-04-21Improved HTML creationRené 'Necoro' Neumann4-3/+22 2020-04-21Upload mails to imapRené 'Necoro' Neumann3-35/+80 2020-04-21Move HTML template to stringRené 'Necoro' Neumann3-12/+13 2020-04-21HTML Template part of the mailRené 'Necoro' Neumann7-18/+199 2020-04-20Fixes and validationRené 'Necoro' Neumann6-28/+25 2020-04-20Fix vettingRené 'Necoro' Neumann1-1/+1 2020-04-20Started with mail creationRené 'Necoro' Neumann4-3/+126 2020-04-20FeeditemsRené 'Necoro' Neumann2-2/+14 2020-04-20GlobalOptionsRené 'Necoro' Neumann3-25/+79 2020-04-19RestructureRené 'Necoro' Neumann6-152/+177 2020-04-19Rename package 'parse' to 'feed'René 'Necoro' Neumann2-3/+3 2020-04-19SELECT is not necessary for most operations -- skip itRené 'Necoro' Neumann2-12/+1 2020-04-19Store path as array -- the delimiter is not always '.'René 'Necoro' Neumann3-36/+44 2020-04-19Split client part to client.goRené 'Necoro' Neumann2-125/+137 2020-04-19IMAP: Create foldersRené 'Necoro' Neumann1-4/+38 2020-04-19Improved IMAPRené 'Necoro' Neumann1-3/+88 2020-04-19Started IMAP connectionRené 'Necoro' Neumann4-0/+152 2020-04-19Use our own logger for debug for convenience sakeRené 'Necoro' Neumann1-2/+3 2020-04-19Fix debug logging m(René 'Necoro' Neumann1-2/+2 2020-04-19Rename util.go to log.go. Add verbose modeRené 'Necoro' Neumann4-24/+54 2020-04-19Clean go.modRené 'Necoro' Neumann2-3/+0 2020-04-19Do not print the parsedCfg anymoreRené 'Necoro' Neumann1-1/+1 2020-04-19Increase go-version to 1.14René 'Necoro' Neumann1-2/+2 2020-04-19CI: go vetRené 'Necoro' Neumann1-0/+3 2020-04-19Fetching and parsing the feedsRené 'Necoro' Neumann5-4/+113 2020-04-19Ignore all config*.ymlRené 'Necoro' Neumann1-1/+1