Browse Source

Enviando coisas passadas. Corrige um pequeno problema.

0.2
Guilherme Gondim 15 years ago
parent
commit
e0ac773910
  1. 1
      sigi/admin/filterspecs.py
  2. 2
      sigi/manage.py
  3. 37
      sigi/templates/index.html
  4. 34
      sigi/templates/snippets/modules/charts-convenios.html

1
sigi/admin/filterspecs.py

@ -1,4 +1,3 @@
from django.db import models
from django.contrib.admin.filterspecs import FilterSpec, ChoicesFilterSpec from django.contrib.admin.filterspecs import FilterSpec, ChoicesFilterSpec
from django.utils.encoding import smart_unicode from django.utils.encoding import smart_unicode
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe

2
sigi/manage.py

@ -1,4 +1,4 @@
#!/usr/bin/env python2.4 #!/usr/bin/env python
from django.core.management import execute_manager from django.core.management import execute_manager
try: try:
import settings # Assumed to be in the same directory. import settings # Assumed to be in the same directory.

37
sigi/templates/index.html

@ -1,46 +1,11 @@
{% extends "admin/index.html" %} {% extends "admin/index.html" %}
{% load charts i18n %}
{% block title %}Dashboard | SIGI{% endblock %} {% block title %}Dashboard | SIGI{% endblock %}
{% block content_title %}<h1>Dashboard</h1>{% endblock %} {% block content_title %}<h1>Dashboard</h1>{% endblock %}
{% block content %} {% block content %}
{% chart as convenios %}
{% chart-size 340 160 %}
{% chart-type "pie" %}
{% chart-labels "Conveniadas" "Não conveniadas" "Não aderidas" %}
{% chart-data convenios_chart_data %}
{% endchart %}
{% chart as regioes %}
{% chart-size 320 160 %}
{% chart-type "column-stacked" %}
{% chart-bar-width "40" %}
{% chart-labels "Centro-O" "Norte" "Nordeste" "Sudeste" "Sul" %}
{% chart-data regioes_chart_data.0 regioes_chart_data.1 %}
{% chart-legend "Conveniadas" "Total" %}
{% chart-colors "ff9900,ffc266" %}
{% endchart %}
<div id="content-main"> <div id="content-main">
<div class="module"> {% include "snippets/modules/charts-convenios.html" %}
<h2>Convênios</h2>
<h3>Convênios com as Casas Legislativas</h3>
<p class="align-center">
<img src="{{ convenios.url }}" class="chart" />
</p>
</div>
<div class="module">
<h2>Convênios</h2>
<h3>Casas Legislativas conveniadas por região</h3>
<p class="align-center">
<img src="{{ regioes.url }}" class="chart" />
</p>
</div>
</div> </div>
{% endblock %} {% endblock %}

34
sigi/templates/snippets/modules/charts-convenios.html

@ -0,0 +1,34 @@
{% load charts %}
{% chart as convenios %}
{% chart-size 340 160 %}
{% chart-type "pie" %}
{% chart-labels "Conveniadas" "Não conveniadas" "Não aderidas" %}
{% chart-data convenios_chart_data %}
{% endchart %}
{% chart as regioes %}
{% chart-size 320 160 %}
{% chart-type "column-stacked" %}
{% chart-bar-width "40" %}
{% chart-labels "Centro-O" "Norte" "Nordeste" "Sudeste" "Sul" %}
{% chart-data regioes_chart_data.0 regioes_chart_data.1 %}
{% chart-legend "Conveniadas" "Total" %}
{% chart-colors "ff9900,ffc266" %}
{% endchart %}
<div class="module">
<h2>Convênios</h2>
<h3>Convênios com as Casas Legislativas</h3>
<p class="align-center">
<img src="{{ convenios.url }}" class="chart" />
</p>
</div>
<div class="module">
<h2>Convênios</h2>
<h3>Casas Legislativas conveniadas por região</h3>
<p class="align-center">
<img src="{{ regioes.url }}" class="chart" />
</p>
</div>
Loading…
Cancel
Save