-# -*- coding: utf-8; -*-
+# -*- coding: utf8; -*-
"""
Copyright (C) 2007 Lincoln de Sousa <lincoln@archlinux-br.org>
Boston, MA 02111-1307, USA.
"""
from django.db import models
+from django.contrib.localflavor.br.br_states import STATE_CHOICES as _states
+# bad hack!
+STATE_CHOICES = [(x, unicode(y).encode('utf8')) for x, y in _states]
+del _states
class Evento(models.Model):
nome = models.CharField(maxlength=100)
nome_contato = models.CharField('Nome do contato', maxlength=100)
telefone = models.CharField(maxlength=100)
cidade = models.CharField(maxlength=100)
- uf = models.CharField(maxlength=100) # TODO: should became a combobox
+ uf = models.CharField(maxlength=2, choices=STATE_CHOICES)
rua = models.CharField(maxlength=100)
numero = models.CharField('NĂºmero', maxlength=10)
info_adicional = models.TextField()
)
def __str__(self):
- return self.name
+ return self.nome
class AreaDeInteresse(models.Model):
nome = models.CharField(maxlength=100)
email = models.CharField(maxlength=100)
- telefone_residencial = models.CharField(maxlength=11)
- telefone_celular = models.CharField(maxlength=11)
- telefone_comercial = models.CharField(maxlength=11)
+ telefone_residencial = models.CharField(maxlength=11, blank=True)
+ telefone_celular = models.CharField(maxlength=11, blank=True)
+ telefone_comercial = models.CharField(maxlength=11, blank=True)
rua = models.CharField(maxlength=100)
numero = models.CharField(maxlength=10)