From: www-data Date: Thu, 27 Sep 2007 16:08:22 +0000 (-0300) Subject: Merge branch 'master' of git://hammerboy.no-ip.org/eventmanager X-Git-Url: http://git.cascardo.info/?p=cascardo%2Feventmanager.git;a=commitdiff_plain;h=11faa820abeb69b688db5076aa4c1cc663dfeb53;hp=d585123c407fd6eac4f786f4cbe5e1b0ec51183a Merge branch 'master' of git://hammerboy.no-ip.org/eventmanager --- diff --git a/__init__.py b/__init__.py index fc9c155..ebf8a9b 100644 --- a/__init__.py +++ b/__init__.py @@ -1,3 +1,22 @@ +""" +Copyright (C) 2007 Lincoln de Sousa +Copyright (C) 2007 Douglas Andrade + +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. +""" def initialize(): from eventos.models import Evento from datetime import datetime diff --git a/eventos/models.py b/eventos/models.py index e698eab..eeae7a5 100644 --- a/eventos/models.py +++ b/eventos/models.py @@ -96,10 +96,11 @@ class Participante(models.Model): cidade = models.CharField(maxlength=100) uf = models.CharField(maxlength=3) cep = models.CharField(maxlength=8) - usuario = models.ForeignKey(User) + cpf_cnpj = models.CharField(maxlength=20, blank=True) comercial = models.BooleanField(default=False) - refbanco = models.IntegerField() + usuario = models.ForeignKey(User) + refbanco = models.IntegerField(editable=False) class Admin: pass @@ -166,7 +167,7 @@ class Trabalho(models.Model): class Admin: fields = ( - (None, {'fields': ('titulo', 'evento', 'categoria', + (None, {'fields': ('titulo', 'evento', 'categoria', 'tipo', 'palestrante', 'descricao_curta', 'descricao_longa', 'recursos')}), ) diff --git a/forms.py b/forms.py index f89c3c7..1f10f13 100644 --- a/forms.py +++ b/forms.py @@ -142,6 +142,15 @@ class InscricaoBase(LoginBase): class Inscricao(InscricaoBase): inscricao_comercial = forms.BooleanField(required=False, label='Inscrição Comercial') + cpf_cnpj = forms.CharField(max_length=20, required=False, label='CPF/CNPJ', + help_text='Somente necessário para a inscrição comercial') + + def clean_cpf_cnpj(self): + cpf_cnpj = self.cleaned_data['cpf_cnpj'] + if self.cleaned_data['inscricao_comercial'] and not cpf_cnpj: + raise ValidationError('Você escolheu a inscrição comercial, ' + 'portanto este campo se torna obrigatório') + return cpf_cnpj class InscricaoCaravana(InscricaoBase): lista_nomes = forms.CharField(label='Lista de nomes', diff --git a/media/css/geral.css b/media/css/geral.css index 2b4ca86..3561423 100644 --- a/media/css/geral.css +++ b/media/css/geral.css @@ -117,7 +117,8 @@ div#patrocinio table { color: #666; } -#cadastro p textarea { +#cadastro p textarea, +#cadastro p input[type=text] { width: 100%; } @@ -149,3 +150,7 @@ div#patrocinio table { .errorlist { color: red; } + +#info-preco li { + padding: 3px; 0px 3px 0px; +} diff --git a/templates/base.html b/templates/base.html index 3d5ecd0..bcf58f1 100644 --- a/templates/base.html +++ b/templates/base.html @@ -15,12 +15,17 @@