Added a donut chart to the quota view

Moved morris.js out of the statistics plugin
This commit is contained in:
Raphael Michel
2016-09-18 19:11:44 +02:00
parent ebbd9aaee9
commit f8ce3523dc
13 changed files with 74 additions and 33 deletions

View File

@@ -1,11 +1,9 @@
from django.core.urlresolvers import resolve, reverse
from django.dispatch import receiver
from django.template import Context
from django.template.loader import get_template
from django.utils.translation import ugettext_lazy as _
from pretix.base.signals import order_paid, order_placed
from pretix.control.signals import html_head, nav_event
from pretix.control.signals import nav_event
@receiver(nav_event, dispatch_uid="statistics_nav")
@@ -26,17 +24,6 @@ def control_nav_import(sender, request=None, **kwargs):
]
@receiver(html_head, dispatch_uid="statistics_html_head")
def html_head_presale(sender, request=None, **kwargs):
url = resolve(request.path_info)
if url.namespace == 'plugins:statistics':
template = get_template('pretixplugins/statistics/control_head.html')
ctx = Context({})
return template.render(ctx)
else:
return ""
def clear_cache(sender, *args, **kwargs):
cache = sender.get_cache()
cache.delete('statistics_obd_data')