forked from CGM_Public/pretix_original
Added a donut chart to the quota view
Moved morris.js out of the statistics plugin
This commit is contained in:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user