statistics: add new module.
This commit is contained in:
parent
fd540b7ee3
commit
96c3cd2b1f
|
@ -159,6 +159,7 @@ INSTALLED_APPS = (
|
|||
'calebasse.facturation',
|
||||
'calebasse.personnes',
|
||||
'calebasse.ressources',
|
||||
'calebasse.statistics',
|
||||
'calebasse.middleware.request',
|
||||
'south',
|
||||
)
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 754 B |
Binary file not shown.
After Width: | Height: | Size: 623 B |
|
@ -1074,6 +1074,9 @@ li#ressources a#img:hover { background-image: url(icon-ressources-hover.png); }
|
|||
li#facturation a#img { background-image: url(icon-facturation.png); }
|
||||
li#facturation a#img:hover { background-image: url(icon-facturation-hover.png); }
|
||||
|
||||
li#statistics a#img { background-image: url(icon-statistics.png); }
|
||||
li#statistics a#img:hover { background-image: url(icon-statistics-hover.png); }
|
||||
|
||||
div.agenda a.print {
|
||||
display: block;
|
||||
text-align: right;
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
{% extends "calebasse/base.html" %}
|
||||
|
||||
{% block title %}{{ block.super }} - Statistiques {% endblock %}
|
|
@ -0,0 +1,19 @@
|
|||
{% extends "ressources/base.html" %}
|
||||
|
||||
{% block header %}
|
||||
{{ block.super }}
|
||||
<span>Statistiques - {{ service_name }}</span>
|
||||
{% endblock %}
|
||||
|
||||
{% block appbar %}
|
||||
<h2>Statistiques</h2>
|
||||
<a href="/">Retourner à l'accueil</a>
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<ul>
|
||||
{% for statistic in statistics %}
|
||||
<li><a href="{{ statistic }}">{{ statistic }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endblock %}
|
|
@ -0,0 +1,16 @@
|
|||
"""
|
||||
This file demonstrates writing tests using the unittest module. These will pass
|
||||
when you run "manage.py test".
|
||||
|
||||
Replace this with more appropriate tests for your application.
|
||||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
|
||||
class SimpleTest(TestCase):
|
||||
def test_basic_addition(self):
|
||||
"""
|
||||
Tests that 1 + 1 always equals 2.
|
||||
"""
|
||||
self.assertEqual(1 + 1, 2)
|
|
@ -0,0 +1,10 @@
|
|||
from django.conf.urls import patterns, include, url
|
||||
|
||||
from views import StatisticsHomepageView
|
||||
|
||||
statistics_patterns = patterns('calebasse.statistics.views', )
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url(r'^(?P<model_name>[a-z-]*)/', include(statistics_patterns)),
|
||||
url(r'^$', StatisticsHomepageView.as_view()),
|
||||
)
|
|
@ -0,0 +1,11 @@
|
|||
# -*- coding: utf-8 -*-
|
||||
from calebasse.cbv import TemplateView
|
||||
|
||||
class StatisticsHomepageView(TemplateView):
|
||||
|
||||
template_name = 'statistics/index.html'
|
||||
|
||||
def get_context_data(self, **kwargs):
|
||||
context = super(StatisticsHomepageView, self).get_context_data(**kwargs)
|
||||
context['statistics'] = list()
|
||||
return context
|
|
@ -24,6 +24,7 @@ service_patterns = patterns('',
|
|||
url(r'^facturation/', include('calebasse.facturation.urls')),
|
||||
url(r'^personnes/', include('calebasse.personnes.urls')),
|
||||
url(r'^ressources/', include('calebasse.ressources.urls')),
|
||||
url(r'^statistics/', include('calebasse.statistics.urls')),
|
||||
)
|
||||
|
||||
urlpatterns = patterns('',
|
||||
|
|
|
@ -17,6 +17,7 @@ APPLICATIONS = (
|
|||
(u'Facturation et décompte', 'facturation', True),
|
||||
(u'Gestion des personnes', 'personnes', True),
|
||||
(u'Gestion des ressources', 'ressources', True),
|
||||
(u'Statistiques', 'statistics', False),
|
||||
)
|
||||
|
||||
def redirect_to_homepage(request):
|
||||
|
|
Reference in New Issue