projects
/
cascardo
/
ema.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
unificating address in a single and big field (cascardo's idea =)
[cascardo/ema.git]
/
eventos
/
models.py
diff --git
a/eventos/models.py
b/eventos/models.py
index
73aacea
..
85e3243
100644
(file)
--- a/
eventos/models.py
+++ b/
eventos/models.py
@@
-27,10
+27,9
@@
class Evento(models.Model):
local = models.CharField(max_length=100)
nome_contato = models.CharField(u'Nome do contato', max_length=100)
telefone = models.CharField(max_length=100)
local = models.CharField(max_length=100)
nome_contato = models.CharField(u'Nome do contato', max_length=100)
telefone = models.CharField(max_length=100)
+ endereco = models.TextField()
cidade = models.CharField(max_length=100)
estado = models.CharField(max_length=2, choices=STATE_CHOICES)
cidade = models.CharField(max_length=100)
estado = models.CharField(max_length=2, choices=STATE_CHOICES)
- rua = models.CharField(max_length=100)
- numero = models.CharField(u'Número', max_length=10)
info_adicional = models.TextField(blank=True)
class Admin:
info_adicional = models.TextField(blank=True)
class Admin:
@@
-39,7
+38,7
@@
class Evento(models.Model):
{'fields': ('nome', 'data_inicio', 'data_final')}),
(u'Informações da sede',
{'fields': ('nome', 'data_inicio', 'data_final')}),
(u'Informações da sede',
- {'fields': ('local', 'nome_contato', '
rua', 'numer
o', 'cidade',
+ {'fields': ('local', 'nome_contato', '
enderec
o', 'cidade',
'estado', 'telefone', 'info_adicional')}),
)
'estado', 'telefone', 'info_adicional')}),
)
@@
-57,9
+56,8
@@
class Palestrante(models.Model):
instituicao = models.CharField(u'Instituição', max_length=250, blank=True)
instituicao = models.CharField(u'Instituição', max_length=250, blank=True)
- rua = models.CharField(max_length=100)
- numero = models.CharField(u'Número', max_length=10)
- bairro = models.CharField(max_length=100)
+ endereco = models.TextField()
+ cep = models.CharField(max_length=5)
cidade = models.CharField(max_length=100)
estado = models.CharField(max_length=2, choices=STATE_CHOICES)
cidade = models.CharField(max_length=100)
estado = models.CharField(max_length=2, choices=STATE_CHOICES)
@@
-78,8
+76,7
@@
class Palestrante(models.Model):
(u'Telefones', {'fields': ('telefone', 'celular')}),
(u'Telefones', {'fields': ('telefone', 'celular')}),
- (u'Endereço', {'fields': ('rua', 'numero',
- 'bairro', 'cidade', 'estado')}),
+ (u'Endereço', {'fields': ('endereco', 'cep', 'cidade', 'estado')}),
(u'Avançado', {'fields': ('usuario',),
'classes': 'collapse'}),
(u'Avançado', {'fields': ('usuario',),
'classes': 'collapse'}),
@@
-107,10
+104,15
@@
class Trabalho(models.Model):
titulo = models.CharField(max_length=100)
evento = models.ForeignKey(Evento)
tipo = models.ForeignKey(TipoTrabalho)
titulo = models.CharField(max_length=100)
evento = models.ForeignKey(Evento)
tipo = models.ForeignKey(TipoTrabalho)
- palestrante = models.
ManyToManyField
(Palestrante)
+ palestrante = models.
ForeignKey
(Palestrante)
descricao_curta = models.TextField(u'Descrição curta')
descricao_longa = models.TextField(u'Descrição longa')
recursos = models.TextField(blank=True)
descricao_curta = models.TextField(u'Descrição curta')
descricao_longa = models.TextField(u'Descrição longa')
recursos = models.TextField(blank=True)
+ outros_palestrantes = \
+ models.ManyToManyField(Palestrante,
+ related_name='outros_palestrantes',
+ blank=True,
+ null=True)
class Admin:
list_filter = 'evento', 'tipo'
class Admin:
list_filter = 'evento', 'tipo'