1 # -*- coding: utf-8; -*-
2 # Copyright (C) 2008 Marcelo Jorge Vieira (metal) <metal@alucinados.com>
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License as
6 # published by the Free Software Foundation; either version 2 of the
7 # License, or (at your option) any later version.
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 # General Public License for more details.
14 # You should have received a copy of the GNU General Public
15 # License along with this program; if not, write to the
16 # Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 # Boston, MA 02111-1307, USA.
19 from django.contrib import admin
20 from eventos.models import *
22 class EventoAdmin(admin.ModelAdmin):
24 (u'Informações do evento',
25 {'fields': ('nome', 'data_inicio', 'data_final', 'site')}),
27 (u'Informações da sede',
28 {'fields': ('local', 'nome_contato', 'endereco', 'cidade',
29 'estado', 'telefone', 'info_adicional')}),
32 search_fields = list_display = 'nome', 'local'
34 class PalestranteAdmin(admin.ModelAdmin):
36 (None, {'fields': ('nome', 'email', 'instituicao',
37 'minicurriculo', 'curriculo')}),
39 (u'Telefones', {'fields': ('telefone', 'celular')}),
41 (u'Endereço', {'fields': ('endereco', 'cep', 'cidade', 'estado')}),
43 (u'Avançado', {'fields': ('usuario',),
44 'classes': 'collapse'}),
47 search_fields = list_display = 'nome', 'instituicao', 'email', 'celular'
49 class TipoTrabalhoAdmin(admin.ModelAdmin):
50 search_fields = 'nome',
51 list_filter = 'evento',
53 class TrilhaAdmin(admin.ModelAdmin):
54 search_fields = 'nome',
55 list_filter = 'evento',
57 class TrabalhoAdmin(admin.ModelAdmin):
58 list_filter = 'evento', 'tipo', 'trilha',
59 search_fields = list_display = 'titulo', 'evento', 'tipo'
61 admin.site.register(Evento, EventoAdmin)
62 admin.site.register(Palestrante, PalestranteAdmin)
63 admin.site.register(TipoTrabalho, TipoTrabalhoAdmin)
64 admin.site.register(Trilha, TrilhaAdmin)
65 admin.site.register(Trabalho, TrabalhoAdmin)