Browse Source

Change Parlamentar's fotografia from FileField to ImageField

pull/98/head
Edward Ribeiro 9 years ago
parent
commit
304be88ec4
  1. 20
      parlamentares/migrations/0010_auto_20160107_1850.py
  2. 2
      parlamentares/models.py

20
parlamentares/migrations/0010_auto_20160107_1850.py

@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.db import models, migrations
import parlamentares.models
class Migration(migrations.Migration):
dependencies = [
('parlamentares', '0009_auto_20151126_1334'),
]
operations = [
migrations.AlterField(
model_name='parlamentar',
name='fotografia',
field=models.ImageField(null=True, verbose_name='Fotografia', blank=True, upload_to=parlamentares.models.foto_upload_path),
),
]

2
parlamentares/models.py

@ -273,7 +273,7 @@ class Parlamentar(models.Model):
ativo = models.BooleanField(verbose_name=_('Ativo na Casa?'))
biografia = models.TextField(
blank=True, null=True, verbose_name=_('Biografia'))
fotografia = models.FileField(
fotografia = models.ImageField(
blank=True,
null=True,
upload_to=foto_upload_path,

Loading…
Cancel
Save