+# -*- coding: utf-8 -*-
+# Copyright (C) 2008 Lincoln de Sousa <lincoln@minaslivre.org>
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of the
+# License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+# General Public License for more details.
+#
+# You should have received a copy of the GNU General Public
+# License along with this program; if not, write to the
+# Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+from django.db import models
+from django.contrib.localflavor.br.br_states import STATE_CHOICES
+from django.contrib.auth.models import User
+
+class Evento(models.Model):
+ nome = models.CharField(max_length=100)
+ data_inicio = models.DateField(u'Data de início')
+ data_final = models.DateField()
+
+ local = models.CharField(max_length=100)
+ nome_contato = models.CharField(u'Nome do contato', max_length=100)
+ telefone = models.CharField(max_length=100)
+ 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:
+ fields = (
+ (u'Informações do evento',
+ {'fields': ('nome', 'data_inicio', 'data_final')}),
+
+ (u'Informações da sede',
+ {'fields': ('local', 'nome_contato', 'rua', 'numero', 'cidade',
+ 'estado', 'telefone', 'info_adicional')}),
+ )
+
+ def __str__(self):
+ return self.nome
+
+class Palestrante(models.Model):
+ nome = models.CharField(max_length=100)
+ email = models.CharField(max_length=100)
+
+ telefone = models.CharField(max_length=100, blank=True)
+ celular = models.CharField(max_length=100, blank=True)
+
+ instituicao = models.CharField(max_length=250, blank=True)
+
+ rua = models.CharField(max_length=100)
+ numero = models.CharField(max_length=10)
+ bairro = models.CharField(max_length=100)
+ cidade = models.CharField(max_length=100)
+ uf = models.CharField(max_length=3)
+
+ minicurriculo = models.TextField('Mini currículo')
+ curriculo = models.TextField('Currículo')
+
+ usuario = models.ForeignKey(User)
+
+ class Admin:
+ fields = (
+ (None, {'fields': ('nome', 'email', 'instituicao',
+ 'minicurriculo', 'curriculo')}),
+ ('Telefones', {'fields': ('telefone', 'celular')}),
+ ('Endereço', {'fields': ('rua', 'numero',
+ 'bairro', 'cidade', 'uf')}),
+ )
+
+ def __str__(self):
+ return self.nome