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 estado = models.CharField(maxlength=100) # TODO: can 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', 'estado', 'rua', 'numero', 'info_adicional')}),
48 class AreaDeInteresse(models.Model):
49 nome = models.CharField(maxlength=100)
58 class Palestrante(models.Model):
59 nome = models.CharField(maxlength=100)
60 email = models.CharField(maxlength=100)
62 telefone_residencial = models.CharField(maxlength=11)
63 telefone_celular = models.CharField(maxlength=11)
64 telefone_comercial = models.CharField(maxlength=11)
66 rua = models.CharField(maxlength=100)
67 numero = models.CharField(maxlength=10)
68 bairro = models.CharField(maxlength=100)
69 cidade = models.CharField(maxlength=100)
70 uf = models.CharField(maxlength=3)
72 minicurriculo = models.TextField('Mini currículo')
73 area_interesse = models.ManyToManyField(AreaDeInteresse)
77 (None, {'fields': ('nome', 'email', 'minicurriculo')}),
78 ('Telefones', {'fields': ('telefone_residencial',
79 'telefone_celular', 'telefone_comercial')}),
80 ('Endereço', {'fields': ('rua', 'numero',
81 'bairro', 'cidade', 'uf')}),
82 (None, {'fields': ('area_interesse',)}),
89 class CategoriaPalestra(models.Model):
90 nome = models.CharField(maxlength=100)
96 verbose_name = 'Categoria de palestra'
97 verbose_name_plural = 'Categorias de palestra'
103 class Palestra(models.Model):
104 titulo = models.CharField(maxlength=100)
105 tema = models.CharField(maxlength=100)
106 evento = models.ForeignKey(Evento)
107 categoria = models.ForeignKey(CategoriaPalestra)
108 palestrante = models.ManyToManyField(Palestrante)
109 descricao_curta = models.TextField()
110 descricao_longa = models.TextField()
114 (None, {'fields': ('titulo', 'tema', 'evento', 'categoria',
115 'palestrante', 'descricao_curta', 'descricao_longa')}),
123 class MiniCurso(models.Model):
124 titulo = models.CharField(maxlength=100)