1 # -*- coding: utf-8; -*-
3 Copyright (C) 2007 Lincoln de Sousa <lincoln@archlinux-br.org>
5 This program is free software; you can redistribute it and/or
6 modify it under the terms of the GNU General Public License as
7 published by the Free Software Foundation; either version 2 of the
8 License, or (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public
16 License along with this program; if not, write to the
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA.
20 from django.db import models
23 class Evento(models.Model):
24 nome = models.CharField(maxlength=100)
25 data_inicio = models.DateTimeField()
26 data_final = models.DateTimeField()
28 nome_local = models.CharField('Nome do local', maxlength=100)
29 nome_contato = models.CharField('Nome do contato', maxlength=100)
30 telefone = models.CharField(maxlength=100)
31 cidade = models.CharField(maxlength=100)
32 uf = models.CharField(maxlength=100) # TODO: should became a combobox
33 rua = models.CharField(maxlength=100)
34 numero = models.CharField('Número', maxlength=10)
35 info_adicional = models.TextField()
39 (None, {'fields': ('nome', 'data_inicio', 'data_final')}),
40 ('Informações da sede', {'fields': ('nome_local', 'nome_contato',
41 'cidade', 'uf', 'rua', 'numero', 'info_adicional')}),
48 class AreaDeInteresse(models.Model):
49 nome = models.CharField(maxlength=100)
52 verbose_name = 'area de interesse'
53 verbose_name_plural = 'areas de interesse'
62 class Palestrante(models.Model):
63 nome = models.CharField(maxlength=100)
64 email = models.CharField(maxlength=100)
66 telefone_residencial = models.CharField(maxlength=11)
67 telefone_celular = models.CharField(maxlength=11)
68 telefone_comercial = models.CharField(maxlength=11)
70 rua = models.CharField(maxlength=100)
71 numero = models.CharField(maxlength=10)
72 bairro = models.CharField(maxlength=100)
73 cidade = models.CharField(maxlength=100)
74 uf = models.CharField(maxlength=3)
76 minicurriculo = models.TextField('Mini currículo')
77 area_interesse = models.ManyToManyField(AreaDeInteresse)
81 (None, {'fields': ('nome', 'email', 'minicurriculo')}),
82 ('Telefones', {'fields': ('telefone_residencial',
83 'telefone_celular', 'telefone_comercial')}),
84 ('Endereço', {'fields': ('rua', 'numero',
85 'bairro', 'cidade', 'uf')}),
86 (None, {'fields': ('area_interesse',)}),
93 class Participante(models.Model):
94 nome = models.CharField(maxlength=100)
103 class CategoriaPalestra(models.Model):
104 nome = models.CharField(maxlength=100)
110 verbose_name = 'Categoria de palestra'
111 verbose_name_plural = 'Categorias de palestra'
117 class Palestra(models.Model):
118 titulo = models.CharField(maxlength=100)
119 tema = models.CharField(maxlength=100)
120 evento = models.ForeignKey(Evento)
121 categoria = models.ForeignKey(CategoriaPalestra)
122 palestrante = models.ManyToManyField(Palestrante)
123 descricao_curta = models.TextField()
124 descricao_longa = models.TextField()
128 (None, {'fields': ('titulo', 'tema', 'evento', 'categoria',
129 'palestrante', 'descricao_curta', 'descricao_longa')}),
137 class MiniCurso(models.Model):
138 titulo = models.CharField(maxlength=100)