Browse Source

Colocar Autoria com autor e partido começando com maiúscula

pull/663/head
Edward Ribeiro 8 years ago
parent
commit
4c0956eaa4
  1. 26
      sapl/materia/migrations/0048_auto_20160927_1254.py
  2. 5
      sapl/materia/models.py
  3. 2
      sapl/templates/crud/detail.html

26
sapl/materia/migrations/0048_auto_20160927_1254.py

@ -0,0 +1,26 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.9.7 on 2016-09-27 15:54
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('materia', '0047_merge'),
]
operations = [
migrations.AlterField(
model_name='autoria',
name='autor',
field=models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to='materia.Autor', verbose_name='Autor'),
),
migrations.AlterField(
model_name='autoria',
name='partido',
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.CASCADE, to='parlamentares.Partido', verbose_name='Partido'),
),
]

5
sapl/materia/models.py

@ -245,8 +245,9 @@ class Autor(models.Model):
class Autoria(models.Model):
partido = models.ForeignKey(Partido, blank=True, null=True)
autor = models.ForeignKey(Autor)
partido = models.ForeignKey(Partido, blank=True, null=True,
verbose_name=_('Partido'))
autor = models.ForeignKey(Autor, verbose_name=_('Autor'))
materia = models.ForeignKey(MateriaLegislativa)
primeiro_autor = models.BooleanField(verbose_name=_('Primeiro Autor'),
choices=YES_NO_CHOICES)

2
sapl/templates/crud/detail.html

@ -17,7 +17,7 @@
</div>
{% endblock actions %}
</div>
{% block extra_msg %}{% endblock extra_msg %}
{% block extra_msg %}dfdsadfasdf{% endblock extra_msg %}
{% block detail_content %}
{% for fieldset in view.layout_display %}
<h2 class="legend">{{ fieldset.legend }}</h2>

Loading…
Cancel
Save