More stats!

This commit is contained in:
nikolark committed 2015-11-29 18:51:31 +01:00
1 parent 6560d3e89b
commit 17545b5261
13 files changed
+189 -154

No files matched your search

+12 -7
View File
@@ -1,6 +1,7 @@
from django.conf.urls import url, patterns
from main.api.views import ProductViewSet
from main.views.stats import stats_list, stats_orders, stats_orders_hourly, stats_products_realtime, stats_products_per_user
from main.views.stats import stats_list, stats_products_realtime, stats_products_per_user, \
OrdersHourlyView, OrdersDailyView, OrdersMonthlyView, OrdersYearlyView
from main.views.general import register, deposit, log
from main.views.reports import inventory, inventory_add, report
from main.views.users import create_user, profile
@@ -12,12 +13,6 @@ urlpatterns = [
url(r'^deposit/$', deposit, name='deposit'),
url(r'^log/$', log, name='log'),
url(r'^log/all$', log, kwargs={'limit': None}, name='log-all'),
# Stats
url(r'^stats/$', stats_list, name='stats'),
url(r'^stats/orders/$', stats_orders, name='stats-orders'),
url(r'^stats/orders/hourly$', stats_orders_hourly, name='stats-orders-hourly'),
url(r'^stats/orders/products_realtime$', stats_products_realtime, name='stats-products-realtime'),
url(r'^stats/products/by_user/(?P<user_id>[0-9]+)/$', stats_products_per_user, name='stats-products-per-user'),
# Users
url(r'^user/create/$', create_user, name='create-user'),
url(r'^profile/$', profile, name='profile'),
@@ -27,6 +22,16 @@ urlpatterns = [
url(r'^report$', report, name='report'),
]
# Stats
urlpatterns += [
url(r'^stats/$', stats_list, name='stats'),
url(r'^stats/orders/hourly/$', OrdersHourlyView.as_view(), name='stats-orders-hourly'),
url(r'^stats/orders/daily/', OrdersDailyView.as_view(), name='stats-orders-daily'),
url(r'^stats/orders/monthly/', OrdersMonthlyView.as_view(), name='stats-orders-monthly'),
url(r'^stats/orders/yearly/', OrdersYearlyView.as_view(), name='stats-orders-yearly'),
url(r'^stats/orders/products_realtime$', stats_products_realtime, name='stats-products-realtime'),
url(r'^stats/products/by_user/(?P<user_id>[0-9]+)/$', stats_products_per_user, name='stats-products-per-user'),
]
# Root level service-worker.js
urlpatterns += patterns(
'django.contrib.staticfiles.views',