Terminando o cadastro de inscrições de caravanas
[cascardo/eventmanager.git] / eventos / models.py
index d3dbb5e..3dd623e 100644 (file)
@@ -1,4 +1,4 @@
-# -*- coding: utf8; -*-
+# -*- coding: utf-8; -*-
 """
 Copyright (C) 2007 Lincoln de Sousa <lincoln@archlinux-br.org>
 
@@ -41,9 +41,9 @@ class Evento(models.Model):
 
     class Admin:
         fields = (
-            (None, {'fields': ('nome', 'data_inicio', 'data_final')}),
+            ('Informações do evento', {'fields': ('nome', 'data_inicio', 'data_final')}),
             ('Informações da sede', {'fields': ('nome_local', 'nome_contato',
-                'cidade', 'uf', 'rua', 'numero', 'info_adicional')}),
+                'cidade', 'uf', 'rua', 'numero','telefone', 'info_adicional')}),
         )
 
     def __str__(self):
@@ -85,6 +85,17 @@ class Palestrante(models.Model):
 
 class Participante(models.Model):
     nome = models.CharField(maxlength=100)
+    email = models.CharField(maxlength=100)
+    rg = models.CharField(maxlength=100)
+    home_page = models.CharField(maxlength=100, blank=True)
+
+    telefone = models.CharField(maxlength=100, blank=True)
+    rua = models.CharField(maxlength=100)
+    numero = models.CharField(maxlength=10)
+    bairro = models.CharField(maxlength=100)
+    cidade = models.CharField(maxlength=100)
+    uf = models.CharField(maxlength=3)
+    usuario = models.ForeignKey(User)
 
     class Admin:
         pass
@@ -93,6 +104,17 @@ class Participante(models.Model):
         return self.nome
 
 
+class Caravana(models.Model):
+    coordenador = models.ForeignKey(Participante)
+    participantes = models.TextField()
+
+    class Admin:
+        pass
+
+    def __str__(self):
+        return str(self.coordenador)
+
+
 class CategoriaTrabalho(models.Model):
     nome = models.CharField(maxlength=100)