Skip to content
This repository was archived by the owner on Nov 25, 2018. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion dzbank/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='index.html')),
url(r'^import/$', import_depot, name="import-depot"),
url(r'^d/chart1/$', chart1, name="d_chart1"),
url(r'^data/allocation/portfolio/current/$', current_portfolio_data, name="current-portfolio-data"),
url(r'^data/allocation/portfolio/conservative/$', conservative_portfolio_data, name="conservative-portfolio-data"),
url(r'^data/allocation/portfolio/balanced/$', balanced_portfolio_data, name="balanced-portfolio-data"),
url(r'^data/allocation/portfolio/bold/$', bold_portfolio_data, name="bold-portfolio-data"),
url(r'^data/simulation/$', simulation_data, name="simulation-data"),
url(r'^simulation/$', simulation, name="simulation"),
url(r'^admin/', admin.site.urls),
]
73 changes: 72 additions & 1 deletion dzbank/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,79 @@ def import_depot(request):
def simulation(request):
return render(request, 'simulation.html', {})

def current_portfolio_data(request):
return JsonResponse([{
'name': 'Installation',
'data': [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}, {
'name': 'Manufacturing',
'data': [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
}, {
'name': 'Sales & Distribution',
'data': [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
}, {
'name': 'Project Development',
'data': [None, None, 7988, 12169, 15112, 22452, 34400, 34227]
}, {
'name': 'Other',
'data': [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
}], safe=False)

def conservative_portfolio_data(request):
return JsonResponse([{
'name': 'Installation',
'data': [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}, {
'name': 'Manufacturing',
'data': [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
}, {
'name': 'Sales & Distribution',
'data': [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
}, {
'name': 'Project Development',
'data': [None, None, 7988, 12169, 15112, 22452, 34400, 34227]
}, {
'name': 'Other',
'data': [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
}], safe=False)

def balanced_portfolio_data(request):
return JsonResponse([{
'name': 'Installation',
'data': [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}, {
'name': 'Manufacturing',
'data': [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
}, {
'name': 'Sales & Distribution',
'data': [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
}, {
'name': 'Project Development',
'data': [None, None, 7988, 12169, 15112, 22452, 34400, 34227]
}, {
'name': 'Other',
'data': [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
}], safe=False)

def bold_portfolio_data(request):
return JsonResponse([{
'name': 'Installation',
'data': [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
}, {
'name': 'Manufacturing',
'data': [24916, 24064, 29742, 29851, 32490, 30282, 38121, 40434]
}, {
'name': 'Sales & Distribution',
'data': [11744, 17722, 16005, 19771, 20185, 24377, 32147, 39387]
}, {
'name': 'Project Development',
'data': [None, None, 7988, 12169, 15112, 22452, 34400, 34227]
}, {
'name': 'Other',
'data': [12908, 5948, 8105, 11248, 8989, 11816, 18274, 18111]
}], safe=False)

def chart1(request):
def simulation_data(request):
return JsonResponse([{
'name': 'Installation',
'data': [43934, 52503, 57177, 69658, 97031, 119931, 137133, 154175]
Expand Down