projects
/
cascardo
/
eventmanager.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
adicionando campo cpf_cnpj na inscrição individual
[cascardo/eventmanager.git]
/
eventos
/
models.py
diff --git
a/eventos/models.py
b/eventos/models.py
index
3dd623e
..
d770b1f
100644
(file)
--- a/
eventos/models.py
+++ b/
eventos/models.py
@@
-95,7
+95,12
@@
class Participante(models.Model):
bairro = models.CharField(maxlength=100)
cidade = models.CharField(maxlength=100)
uf = models.CharField(maxlength=3)
bairro = models.CharField(maxlength=100)
cidade = models.CharField(maxlength=100)
uf = models.CharField(maxlength=3)
+ cep = models.CharField(maxlength=8)
+ cpf_cnpj = models.CharField(maxlength=20, blank=True)
+
+ comercial = models.BooleanField(default=False)
usuario = models.ForeignKey(User)
usuario = models.ForeignKey(User)
+ refbanco = models.IntegerField()
class Admin:
pass
class Admin:
pass
@@
-114,6
+119,13
@@
class Caravana(models.Model):
def __str__(self):
return str(self.coordenador)
def __str__(self):
return str(self.coordenador)
+ def parsed_participantes(self):
+ real_data = []
+ for i in self.participantes.split('\n'):
+ if i.strip():
+ nome, email = i.rsplit(' ', 1)
+ real_data.append({'nome': nome, 'email': email})
+ return real_data
class CategoriaTrabalho(models.Model):
nome = models.CharField(maxlength=100)
class CategoriaTrabalho(models.Model):
nome = models.CharField(maxlength=100)