Merge branch 'master' of /var/www/emsl2007/eventmanager/
authorThadeu Lima de Souza Cascardo <cascardo@mail.holoscopio.com>
Fri, 28 Sep 2007 11:49:45 +0000 (08:49 -0300)
committerThadeu Lima de Souza Cascardo <cascardo@mail.holoscopio.com>
Fri, 28 Sep 2007 11:49:45 +0000 (08:49 -0300)
Conflicts:

forms.py
settings.py
templates/meus_trabalhos.html
views.py

37 files changed:
__init__.py
decorators.py
eventos/models.py
forms.py
get_data.py [new file with mode: 0755]
media/css/geral.css
media/imgs/bg_footer.png [new file with mode: 0644]
media/imgs/bg_top.png [new file with mode: 0644]
media/imgs/bt_entrar.gif [new file with mode: 0644]
media/imgs/el_data.gif [new file with mode: 0644]
media/imgs/el_footer.gif [new file with mode: 0644]
media/imgs/emsl07.jpg [new file with mode: 0644]
media/imgs/logo.svg [new file with mode: 0644]
media/imgs/menu_avaliacao.gif [new file with mode: 0644]
media/imgs/menu_chamada-de-trabalhos.gif [new file with mode: 0644]
media/imgs/menu_como-chegar.gif [new file with mode: 0644]
media/imgs/menu_contato.gif [new file with mode: 0644]
media/imgs/menu_home.gif [new file with mode: 0644]
media/imgs/menu_inscricao.gif [new file with mode: 0644]
media/imgs/menu_localizacao.gif [new file with mode: 0644]
media/imgs/menu_onde-comer.gif [new file with mode: 0644]
media/imgs/menu_onde-ficar.gif [new file with mode: 0644]
media/imgs/menu_programacao.gif [new file with mode: 0644]
media/imgs/menu_retrospectiva.gif [new file with mode: 0644]
media/imgs/tit_patrocinio.gif [new file with mode: 0644]
settings.py
templates/base.html
templates/cadastro.html
templates/editar_palestrante.html [deleted file]
templates/editar_usuario.html [new file with mode: 0644]
templates/email-palestrante.html [new file with mode: 0644]
templates/inscricao.html
templates/inscricao_caravana.html [new file with mode: 0644]
templates/inscricao_individual.html [new file with mode: 0644]
templates/meus_trabalhos.html
urls.py
views.py

index fc9c155..ebf8a9b 100644 (file)
@@ -1,3 +1,22 @@
+"""
+Copyright (C) 2007 Lincoln de Sousa <lincoln@archlinux-br.org>
+Copyright (C) 2007 Douglas Andrade <douglas@archlinux-br.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.
+"""
 def initialize():
     from eventos.models import Evento
     from datetime import datetime
index 079a484..6918158 100644 (file)
@@ -17,7 +17,10 @@ License along with this program; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.
 
+    Changes:
+
     * Lincoln de Sousa (22 Jul 2007) adding is_login_form here.
+
 """
 from django.contrib.auth.forms import AuthenticationForm
 from django.contrib.auth import login
@@ -40,10 +43,9 @@ def enable_login_form(func):
                     request.session.delete_test_cookie()
                 except KeyError:
                     pass
+                return HttpResponseRedirect('/')
             else:
-                # TODO: Notify the user that data sent is wrong.
-                msg = _('User name and Password doesn\'t match')
-                request.error_message = msg
+                return HttpResponseRedirect('/?login_failed')
 
         request.session.set_test_cookie()
         return func(request, *args, **kwargs)
index eda0771..eeae7a5 100644 (file)
@@ -85,6 +85,22 @@ class Palestrante(models.Model):
 
 class Participante(models.Model):
     nome = models.CharField(maxlength=100)
+    email = models.CharField(maxlength=100)
+    rg = models.CharField(maxlength=100)
+    home_page = models.CharField(maxlength=100, blank=True)
+
+    telefone = models.CharField(maxlength=100, blank=True)
+    rua = models.CharField(maxlength=100)
+    numero = models.CharField(maxlength=10)
+    bairro = models.CharField(maxlength=100)
+    cidade = models.CharField(maxlength=100)
+    uf = models.CharField(maxlength=3)
+    cep = models.CharField(maxlength=8)
+    cpf_cnpj = models.CharField(maxlength=20, blank=True)
+
+    comercial = models.BooleanField(default=False)
+    usuario = models.ForeignKey(User)
+    refbanco = models.IntegerField(editable=False)
 
     class Admin:
         pass
@@ -93,6 +109,24 @@ class Participante(models.Model):
         return self.nome
 
 
+class Caravana(models.Model):
+    coordenador = models.ForeignKey(Participante)
+    participantes = models.TextField()
+
+    class Admin:
+        pass
+
+    def __str__(self):
+        return str(self.coordenador)
+
+    def parsed_participantes(self):
+        real_data = []
+        for i in self.participantes.split('\n'):
+            if i.strip():
+                nome, email = i.rsplit(' ', 1)
+                real_data.append({'nome': nome, 'email': email})
+        return real_data
+
 class CategoriaTrabalho(models.Model):
     nome = models.CharField(maxlength=100)
 
@@ -133,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')}),
         )
index 8dc99df..1f10f13 100644 (file)
--- a/forms.py
+++ b/forms.py
@@ -18,13 +18,33 @@ Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.
 """
 from django import newforms as forms
-from django.newforms.widgets import Textarea, PasswordInput
+from django.newforms import ValidationError
+from django.newforms.widgets import Textarea, PasswordInput, HiddenInput
+from django.contrib.auth.models import User
 from eventmanager.eventos.models import \
         TipoTrabalho, CategoriaTrabalho, Palestrante, STATE_CHOICES
 
 MKCHOICES = lambda K, xid=-1:[(x.id, str(x)) for x in K.objects.all() \
         if xid != x.id]
 
+class LoginBase(forms.Form):
+    nome_usuario = forms.CharField(max_length=100)
+    senha = forms.CharField(max_length=100, widget=PasswordInput())
+    senha_2 = forms.CharField(max_length=100, widget=PasswordInput(),
+        label='Conferir Senha')
+
+    def clean_nome_usuario(self):
+        try:
+            User.objects.get(username=self.cleaned_data['nome_usuario'])
+            raise ValidationError('Já existe um usuário com esse nome')
+        except User.DoesNotExist:
+            return self.cleaned_data['nome_usuario']
+
+    def clean_senha_2(self):
+        if self.cleaned_data['senha'] != self.cleaned_data['senha_2']:
+            raise ValidationError('A confirmação não confere com a senha')
+        return self.cleaned_data['senha_2']
+
 class SubmeterTrabalho(forms.Form):
     def __init__(self, request, *args, **kwargs):
         super(SubmeterTrabalho, self).__init__(*args, **kwargs)
@@ -52,12 +72,8 @@ class SubmeterTrabalho(forms.Form):
                   'ex.: Computadores, softwares, etc. Máximo de 300 caracteres.')
     outros_palestrantes = forms.MultipleChoiceField(required=0)
 
-class CadastroPalestrante(forms.Form):
+class CadastroPalestrante(LoginBase):
     nome_completo = forms.CharField(max_length=100)
-    nome_usuario = forms.CharField(max_length=100)
-    senha = forms.CharField(max_length=100, widget=PasswordInput())
-    senha_2 = forms.CharField(max_length=100, widget=PasswordInput(),
-        label='Conferir Senha')
     email = forms.CharField(max_length=100)
 
     telefone = forms.CharField(required=False)
@@ -65,10 +81,10 @@ class CadastroPalestrante(forms.Form):
 
     instituicao = forms.CharField(max_length=100, label='Instituição')
     minicurriculo = forms.CharField(widget=Textarea(), max_length=250, label='Mini Currículo',
-       help_text='Este mini currículo será utilizado no material de divulgação'
-                 'e no site. Máximo de 250 caracteres.')
+       help_text='Este mini currículo será utilizado no material de divulgação '
+                 'e no sítio. Máximo de 250 caracteres.')
     curriculo = forms.CharField(widget=Textarea(), max_length=6000, label='Currículo',
-       help_text='Este currículo será utilizado para avaliação do palestrante.'
+       help_text='Este currículo será utilizado para avaliação do palestrante. '
                  'Máximo de 6000 caracteres.')
     rua = forms.CharField(max_length=100)
     numero = forms.CharField(max_length=10, label='Número')
@@ -76,6 +92,11 @@ class CadastroPalestrante(forms.Form):
     cidade = forms.CharField(max_length=100)
     uf = forms.ChoiceField(choices=STATE_CHOICES)
 
+    def clean_celular(self):
+        if not self.cleaned_data['telefone'] and \
+           not self.cleaned_data['celular']:
+            raise ValidationError('Algum número de precisa ser preenchido')
+        return self.cleaned_data['celular']
 
 class EditarPalestrante(forms.Form):
     nome = forms.CharField(max_length=100, label='Nome completo')
@@ -97,22 +118,72 @@ class EditarPalestrante(forms.Form):
     cidade = forms.CharField(max_length=100)
     uf = forms.ChoiceField(choices=STATE_CHOICES)
 
-
 class EditarSenha(forms.Form):
     senha_atual = forms.CharField(max_length=100, widget=PasswordInput())
     nova_senha = forms.CharField(max_length=100, widget=PasswordInput())
     nova_senha_2 = forms.CharField(max_length=100, widget=PasswordInput(),
         label='Conferir Senha')
 
-
-class Inscricao(forms.Form):
+class InscricaoBase(LoginBase):
     nome_completo = forms.CharField(max_length=100)
-    cpf = forms.CharField(max_length=100)
-    email = forms.CharField(max_length=100)
+    rg = forms.CharField(max_length=100)
 
+    email = forms.CharField(max_length=100)
     rua = forms.CharField(max_length=100)
     numero = forms.CharField(max_length=10, label='Número')
     bairro = forms.CharField(max_length=100)
     cidade = forms.CharField(max_length=100)
     uf = forms.ChoiceField(choices=STATE_CHOICES)
-
+    cep = forms.CharField(max_length=8, help_text='Somente números')
+    telefone = forms.CharField(max_length=100)
+    home_page = forms.CharField(max_length=100, label='Página Pessoal',
+        required=False)
+
+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',
+        widget=forms.Textarea(), help_text='Um participante por linha, '
+        'informando nome completo e email no seguine formato: '
+        'Nome Completo &lt;email@server.domain&gt;')
+
+    def clean_lista_nomes(self):
+        nomes = self.cleaned_data['lista_nomes']
+        if len([x for x in nomes.split('\n') if x]) < 10:
+            raise ValidationError('A caravana precisa de pelo menos 10 '
+                    'participantes.')
+        return nomes
+
+class Boleto(forms.Form):
+    # Field names are in mixedCase because of bb's sistem request =/
+    idConv = forms.CharField(max_length=6, initial='303366',
+            widget=HiddenInput())
+    refTran = forms.CharField(max_length=17,
+            widget=HiddenInput())
+    tpPagamento = forms.CharField(max_length=2, initial='21',
+            widget=HiddenInput())
+    valor = forms.CharField(max_length=15, widget=HiddenInput())
+    dtVenc = forms.CharField(max_length=8, widget=HiddenInput())
+    urlRetorno = forms.CharField(max_length=60, initial='/inscricao',
+            widget=HiddenInput())
+    urlInforma = forms.CharField(max_length=60, initial='/inscricao',
+            widget=HiddenInput())
+    nome = forms.CharField(max_length=60, widget=HiddenInput())
+    endereco = forms.CharField(max_length=60, widget=HiddenInput())
+    cidade = forms.CharField(max_length=18, widget=HiddenInput())
+    uf = forms.CharField(max_length=2, widget=HiddenInput())
+    cep = forms.CharField(max_length=8, widget=HiddenInput())
+    msgLoja = forms.CharField(max_length=480,
+            initial='Nao receber apos a data de vencimento',
+            widget=HiddenInput())
diff --git a/get_data.py b/get_data.py
new file mode 100755 (executable)
index 0000000..8782d62
--- /dev/null
@@ -0,0 +1,38 @@
+#!/usr/bin/env python
+# -*- coding: utf-8; -*-
+"""
+Copyright (C) 2007 Lincoln de Sousa <lincoln@archlinux-br.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.
+"""
+import sys
+import os
+
+if '-h' in sys.argv or '--help' in sys.argv:
+    print 'Usage: %s\n' \
+          'Script used to extract data from Trabalho and ' \
+          'Palestrante entities.' % sys.argv[0]
+    sys.exit(0)
+
+# hackish django setup...
+sys.path.append(os.path.join(os.path.dirname(__file__), '..'))
+os.environ['DJANGO_SETTINGS_MODULE'] = 'eventmanager.settings'
+
+from eventos.models import *
+
+for i in Trabalho.objects.all():
+    for j in i.palestrante.all():
+        print i.titulo + ':' + j.nome + ':' + j.email
index 4860a03..3561423 100644 (file)
-body {
-    margin: 0px;
-    background-color: #fff;
-    font-family: verdana,arial,helvetica,sans-serif;
-}
-
-h1.title {
-    color: #f00;
-    background: url(/site_media/imgs/logo.png) no-repeat;
-    width: 471px;
-    height: 150px;
-    overflow: hidden;
-}
-
-h1.title a {
-    display: block;
-    padding-top: 190px;
-}
-
-h2 {
-    padding: 0px 0px 0px 0px;
-    margin: 0px;
-    text-transform: uppercase;
-    color: #cc0000;
-}
-
-label {
-    display: block;
-    width: 180px;
-    font-weight: bold;
-    font-style: normal;
-    color: #000;
-}
-
-em {
-    color: #999;
-}
-
-a {
-    color: #cc0000;
-    text-decoration: none;
-}
-
-a:hover {
-    text-decoration: underline;
-}
-
-#headsection {
-    border: solid 1px #f7f7f7;
-    background: #e4e4e4;
-    padding: 0px 60px 0px 60px;
-}
-
-#login-form {
-    position: absolute;
-    right: 60px;
-    top: 120px;
-}
-
-#login-form label {
-    width: 80px !important;
-    float: left;
-}
-
-#login-form input[type=text] {
-    width: 100px;
-}
-
-#login-form input[type=password]  {
-    width: 40px;
-}
-
-#menu-palestrante {
-    position: absolute;
-    right: 60px;
-    top: 30px;
-}
-
-#menu-palestrante ul {
-    padding-left: 15px;
-    margin: 0px;
-    list-style-type: square;
-}
-
-#main-menu li {
-}
-
-#menu {
-    list-style-type: none;
-    list-style-image: none;
-    padding: 0px;
-    margin: 0px;
-    background-color: #cc0000;
-    padding: 5px 60px 5px 60px;
-}
-
-#menu li {
-    display: inline;
-    padding-right: 15px;
-}
-
-#menu li a {
-    text-transform: uppercase;
-    text-decoration: none;
-    font-weight: bold;
-    color: white;
-}
-
-#content {
-    padding: 0px;
-    margin: 20px 60px 0px 60px;
-}
-
-#footer {
-    margin: 25px 60px 5px 60px;
-    padding-top: 10px;
-    border-top: solid 1px #c00;
-    text-align: center;
-}
-
-#news {
-    list-style-type: none;
-    padding-left: 0px;
-    border: dotted 1px #d7d7d7;
-}
-
-#news li {
-    padding: 4px;
-}
-
-.even {
-    background-color: #f7e7fe;
-}
-
-.errorlist {
-    padding: 0px;
-    margin: 0px;
-    color: red;
-    list-style-type: none;
-}
-
-#cadastro input[type=text] {
-    width: 300px;
-}
-
-#cadastro p {
-    display: block;
-    width: 450px;
-    font-style: italic;
-    font-size: small;
-    color: #666;
-}
-
-#cadastro p textarea {
-    width: 100%;
-}
-
-#id_minicurriculo,
-#id_descricao_curta {
-    height: 60px;
-}
-
-#id_recursos {
-    height: 150px;
-}
+* {margin:0; padding:0; border:0;}\r
+\r
+body {\r
+    font-family:"Lucida Grande","Lucida Sans Unicode",geneva,verdana,sans-serif;\r
+    font-size:12px;\r
+    color:#222;\r
+    line-height:1.65em;\r
+    background:url(/site_media/imgs/bg_top.png) repeat-x;\r
+}\r
+\r
+a {\r
+    color: red;\r
+    text-decoration: none;\r
+}\r
+\r
+a:hover {\r
+    text-decoration: underline;\r
+}\r
+\r
+div#top h1 {\r
+    text-indent:-9999px;\r
+    width:355px;\r
+    height:134px;\r
+    background:url(/site_media/imgs/emsl07.jpg) no-repeat;\r
+    margin:34px 0 0 30px;\r
+}\r
+\r
+div#top h2 {\r
+    text-indent:-9999px;\r
+    width:217px;\r
+    height:56px;\r
+    background:url(/site_media/imgs/el_data.gif) no-repeat;\r
+    margin-top:-142px;\r
+    margin-left:530px;\r
+}\r
+\r
+div#top form {\r
+    width:748px;\r
+    text-align:right;\r
+    margin-top:15px;\r
+}\r
+\r
+div#top input { border:1px solid #C00; width:85px; }\r
+div#top label { color:white; padding-left:10px; }\r
+\r
+div#container {width:718px; padding:67px 30px 30px 30px; }\r
+\r
+ul#menu {\r
+    float:left;\r
+    width:180px;\r
+    list-style:none;\r
+    margin-bottom:35px;\r
+}\r
+\r
+div#content {\r
+    padding-left:220px;\r
+}\r
+\r
+h2, h3, h4 { font-weight:normal; }\r
+div#content h2 { font-size:24px; margin-bottom:20px; margin-top:5px; }\r
+div#content h3 { font-size:16px; color:#CC0D0D; margin-bottom:16px; margin-top:5px; }\r
+div#content h4 { font-size:16px; color:#666; margin-bottom:13px; margin-top:5px; }\r
+\r
+div#content p {margin-bottom:15px;}\r
+\r
+div#content ul {list-style:circle inside;}\r
+\r
+div#footer {\r
+    background:url(/site_media/imgs/bg_footer.png) repeat-x #333;\r
+    clear:both;\r
+    height:145px;\r
+    padding:13px 30px 15px 30px;\r
+}\r
+\r
+div#org {float:left;}\r
+\r
+div#patrocinio {padding-left:220px;}\r
+\r
+div#patrocinio h3 {\r
+    width:58px;\r
+    height:14px;\r
+    background:url(/site_media/imgs/tit_patrocinio.gif) no-repeat;\r
+    text-indent:-9999px;\r
+}\r
+\r
+div#patrocinio table {\r
+    background:white;\r
+    margin-top:13px;\r
+}\r
+\r
+\r
+/* -- meu -- */\r
+\r
+#cadastro input,\r
+#cadastro textarea,\r
+#cadastro select {\r
+    border: solid 1px #666;\r
+}\r
+\r
+#cadastro input[type=text] {\r
+    width: 300px;\r
+}\r
+\r
+#cadastro label {\r
+    display: block;\r
+    float: left;\r
+    width: 450px;\r
+    font-style: normal;\r
+    color: #000;\r
+}\r
+\r
+#cadastro p {\r
+    display: block;\r
+    width: 450px;\r
+    font-style: italic;\r
+    font-size: small;\r
+    color: #666;\r
+}\r
+\r
+#cadastro p textarea,\r
+#cadastro p input[type=text] {\r
+    width: 100%;\r
+}\r
+\r
+#id_minicurriculo,\r
+#id_descricao_curta {\r
+    height: 60px;\r
+}\r
+\r
+#id_recursos {\r
+    height: 150px;\r
+}\r
+\r
+#menu-palestrante {\r
+    position: absolute;\r
+    top: 125px;\r
+    width: 250px !important;\r
+    margin-left: 498px;\r
+}\r
+\r
+#menu-palestrante ul {\r
+    list-style-type: none;\r
+}\r
+\r
+.login-failed {\r
+    background-color: red;\r
+    border: solid 1px white !important;\r
+}\r
+\r
+.errorlist {\r
+    color: red;\r
+}\r
+\r
+#info-preco li {\r
+    padding: 3px; 0px 3px 0px;\r
+}\r
diff --git a/media/imgs/bg_footer.png b/media/imgs/bg_footer.png
new file mode 100644 (file)
index 0000000..1b33a8c
Binary files /dev/null and b/media/imgs/bg_footer.png differ
diff --git a/media/imgs/bg_top.png b/media/imgs/bg_top.png
new file mode 100644 (file)
index 0000000..474f0b8
Binary files /dev/null and b/media/imgs/bg_top.png differ
diff --git a/media/imgs/bt_entrar.gif b/media/imgs/bt_entrar.gif
new file mode 100644 (file)
index 0000000..0374604
Binary files /dev/null and b/media/imgs/bt_entrar.gif differ
diff --git a/media/imgs/el_data.gif b/media/imgs/el_data.gif
new file mode 100644 (file)
index 0000000..ea96afe
Binary files /dev/null and b/media/imgs/el_data.gif differ
diff --git a/media/imgs/el_footer.gif b/media/imgs/el_footer.gif
new file mode 100644 (file)
index 0000000..dd9db61
Binary files /dev/null and b/media/imgs/el_footer.gif differ
diff --git a/media/imgs/emsl07.jpg b/media/imgs/emsl07.jpg
new file mode 100644 (file)
index 0000000..a7ac785
Binary files /dev/null and b/media/imgs/emsl07.jpg differ
diff --git a/media/imgs/logo.svg b/media/imgs/logo.svg
new file mode 100644 (file)
index 0000000..68e34d8
--- /dev/null
@@ -0,0 +1,342 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://web.resource.org/cc/"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   id="svg2178"
+   sodipodi:version="0.32"
+   inkscape:version="0.45.1"
+   width="1052.3622"
+   height="744.09448"
+   sodipodi:docname="logo_emsl2.svg"
+   sodipodi:docbase="/home/pythonwarrior/Desktop"
+   inkscape:output_extension="org.inkscape.output.svg.inkscape"
+   inkscape:export-filename="C:\Documents and Settings\Apache\Desktop\EMSL\logo_export2.png"
+   inkscape:export-xdpi="52.83704"
+   inkscape:export-ydpi="52.83704"
+   version="1.0">
+<!--
+Copyright (c) 2007 Lucas da Costa Petes <lucas@milk-it.net>
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+-->
+
+  <metadata
+     id="metadata2313">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs2311">
+    <linearGradient
+       id="linearGradient6148">
+      <stop
+         id="stop6150"
+         offset="0"
+         style="stop-color:#cc0000;stop-opacity:1;" />
+      <stop
+         id="stop6152"
+         offset="1"
+         style="stop-color:#00000f;stop-opacity:0.5;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3314">
+      <stop
+         style="stop-color:#ff0000;stop-opacity:1;"
+         offset="0"
+         id="stop3316" />
+      <stop
+         style="stop-color:#af0000;stop-opacity:1;"
+         offset="1"
+         id="stop3318" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3314"
+       id="linearGradient2229"
+       gradientUnits="userSpaceOnUse"
+       x1="95.665108"
+       y1="991.19348"
+       x2="131.26001"
+       y2="966.51855"
+       gradientTransform="matrix(2.005159,0,0,2.005159,56.607658,-1538.8578)" />
+  </defs>
+  <sodipodi:namedview
+     inkscape:window-height="746"
+     inkscape:window-width="1270"
+     inkscape:pageshadow="2"
+     inkscape:pageopacity="0"
+     guidetolerance="10.0"
+     gridtolerance="10.0"
+     objecttolerance="10.0"
+     borderopacity="1.0"
+     bordercolor="#666666"
+     pagecolor="#ffffff"
+     id="base"
+     inkscape:document-units="mm"
+     inkscape:zoom="0.64044559"
+     inkscape:cx="546.21336"
+     inkscape:cy="367.25837"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:current-layer="svg2178"
+     showguides="false"
+     inkscape:guide-bbox="true"
+     width="1052.3622px"
+     height="744.09448px">
+    <sodipodi:guide
+       orientation="horizontal"
+       position="669.53032"
+       id="guide2211" />
+    <sodipodi:guide
+       orientation="horizontal"
+       position="415.03325"
+       id="guide2217" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="721.46849"
+       id="guide2219" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="302.18576"
+       id="guide2221" />
+    <sodipodi:guide
+       orientation="horizontal"
+       position="642.14473"
+       id="guide2223" />
+    <sodipodi:guide
+       orientation="horizontal"
+       position="532.6024"
+       id="guide2225" />
+    <sodipodi:guide
+       orientation="horizontal"
+       position="521.27043"
+       id="guide2227" />
+    <sodipodi:guide
+       orientation="horizontal"
+       position="474.52607"
+       id="guide2229" />
+    <sodipodi:guide
+       orientation="horizontal"
+       position="462.72194"
+       id="guide2231" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="279.52182"
+       id="guide2233" />
+    <sodipodi:guide
+       orientation="vertical"
+       position="-247.06472"
+       id="guide2235" />
+  </sodipodi:namedview>
+  <path
+     d="M 420.31371,386.82066 L 420.31371,250.91098 L 474.97435,250.91098 L 474.97435,270.56154 L 441.28768,270.56154 L 441.28768,306.17316 L 465.5501,306.17316 L 465.5501,325.80367 L 441.28768,325.80367 L 441.28768,366.40814 L 474.97435,366.40814 L 474.97435,386.82066 L 420.31371,386.82066 z "
+     id="path2180" />
+  <path
+     d="M 486.48396,386.82066 L 486.48396,250.91098 L 514.25541,250.91098 L 527.95065,326.2047 C 529.1738,332.40064 529.79539,339.19813 529.79539,346.59717 C 529.79539,340.702 530.39694,333.96467 531.62009,326.36511 L 544.65362,250.91098 L 573.10683,250.91098 L 573.10683,386.82066 L 553.27581,386.82066 L 553.27581,300.99985 C 553.27581,295.98695 553.83725,288.10668 555.00024,277.31892 C 555.00024,277.51944 554.57916,280.02589 553.7771,284.83827 C 553.1555,288.72828 552.45369,292.63834 551.71178,296.5885 L 534.58772,386.82066 L 524.1609,386.82066 L 507.95921,296.46819 C 507.29751,291.95659 506.15457,285.58018 504.53039,277.31892 C 505.45276,287.28456 505.91395,295.18489 505.91395,300.99985 L 505.91395,386.82066 L 486.48396,386.82066 z "
+     id="path2182" />
+  <path
+     d="M 584.39587,352.31187 L 604.40736,349.32418 C 605.14927,362.7788 609.78119,369.49608 618.30311,369.49608 C 622.17307,369.49608 625.30112,368.27294 627.64715,365.84669 C 629.99319,363.4004 631.17623,360.2523 631.17623,356.36229 C 631.17623,349.30413 625.52169,340.18066 614.21259,328.99187 L 612.22748,327.02682 C 603.58525,318.36453 597.71013,311.76756 594.58208,307.25595 C 589.06789,299.21526 586.32083,291.03421 586.32083,282.69275 C 586.32083,273.2685 589.40877,265.24787 595.58466,258.59074 C 601.76055,251.93361 609.52052,248.60505 618.86456,248.60505 C 628.26875,248.60505 635.7881,251.93361 641.44265,258.59074 C 646.57585,264.66637 649.52344,272.5667 650.2854,282.29172 L 629.77262,285.21925 C 629.09087,273.91015 625.26101,268.23555 618.30311,268.23555 C 610.84392,268.23555 607.11433,272.44639 607.11433,280.82795 C 607.11433,288.70823 613.69125,299.01474 626.88519,311.72745 L 628.08829,312.9506 C 636.16908,320.77072 641.70332,327.12707 644.71106,332.01966 C 649.28282,339.27834 651.5687,347.27892 651.5687,355.98131 C 651.5687,365.68628 648.56096,373.76707 642.54549,380.22368 C 636.53001,386.6803 628.70989,389.9086 619.06507,389.9086 C 608.15701,389.9086 599.65513,386.29932 593.4993,379.1008 C 587.92495,372.46372 584.89716,363.54076 584.39587,352.31187 z "
+     id="path2184" />
+  <path
+     d="M 716.11477,386.84071 L 717.61864,366.5084 C 707.33217,366.5886 701.67762,366.66881 700.65499,366.80917 C 699.61231,366.92948 698.70999,366.98964 697.96808,366.98964 C 690.6292,366.98964 686.97981,363.19988 686.97981,355.62038 L 686.97981,251.69299 L 666.00585,251.69299 L 666.00585,351.59001 C 666.00585,363.82148 668.011,372.86475 672.02132,378.75992 C 676.23216,384.8957 682.36794,387.84329 690.44873,387.58262 L 716.11477,386.84071 z "
+     id="path2186" />
+  <path
+     d="M 720.62638,281.3894 L 732.65733,281.3894 L 732.65733,322.29464 L 720.62638,322.29464 L 720.62638,281.3894 z "
+     id="path2188"
+     style="fill:#cc0000;fill-opacity:1" />
+  <path
+     d="M 765.31636,278.38015 C 757.27567,278.38015 751.11983,280.90672 746.76864,285.8995 C 742.59791,290.65173 740.5652,297.05825 740.56518,305.19916 L 740.56518,359.58909 C 740.56518,379.2597 748.63592,389.03989 764.87773,389.03987 C 773.23924,389.03987 779.52792,386.2552 783.73876,380.5806 C 787.50846,375.54765 789.37825,368.69001 789.37827,360.02772 L 789.37827,305.63779 C 789.37827,297.65725 787.43829,291.23072 783.48811,286.33813 C 779.17702,281.04451 773.09635,278.3802 765.31636,278.38015 z M 764.94039,293.60683 C 767.50699,293.60683 769.5598,294.31862 771.14385,295.86263 C 772.70788,297.40661 773.46232,299.45684 773.46232,302.00343 L 773.46232,364.1007 C 773.46232,370.71773 770.68515,374.00119 765.19104,374.00117 C 759.35602,374.00117 756.48115,370.71775 756.48113,364.1007 L 756.48113,301.87811 C 756.48113,299.43182 757.25813,297.40657 758.86225,295.86263 C 760.44633,294.31866 762.49412,293.60683 764.94039,293.60683 z "
+     id="path2190"
+     style="fill:#cc0000;fill-opacity:1" />
+  <path
+     d="M 793.55401,295.98695 L 793.55401,280.64749 L 838.08859,280.64749 L 838.08859,292.25736 L 818.23752,386.82066 L 802.41681,386.82066 L 821.92701,295.98695 L 793.55401,295.98695 z "
+     id="path2194"
+     style="fill:#cc0000;fill-opacity:1" />
+  <path
+     d="M 419.71217,444.97027 L 419.71217,399.67373 L 440.80644,399.67373 L 440.80644,406.21055 L 427.79296,406.21055 L 427.79296,418.08109 L 437.15705,418.08109 L 437.15705,424.63796 L 427.79296,424.63796 L 427.79296,438.17278 L 440.80644,438.17278 L 440.80644,444.97027 L 419.71217,444.97027 z "
+     id="path2196"
+     sodipodi:nodetypes="ccccccccccccc" />
+  <path
+     d="M 445.09748,444.97027 L 445.09748,411.54427 L 452.37621,411.54427 L 452.37621,415.21371 C 455.10322,412.46664 457.85029,411.08308 460.61741,411.08308 C 463.98608,411.08308 465.69046,413.04814 465.69046,416.97825 L 465.69046,444.97027 L 458.47189,444.97027 L 458.47189,419.74537 C 458.47189,418.00088 457.83024,417.11861 456.54694,417.11861 C 455.32379,417.11861 453.92018,417.96078 452.37621,419.62506 L 452.37621,444.97027 L 445.09748,444.97027 z "
+     id="path2198" />
+  <path
+     d="M 470.42264,435.52597 L 470.42264,420.78805 C 470.42264,417.82042 471.36506,415.41422 473.24991,413.58953 C 475.21497,411.66458 477.90188,410.7021 481.2906,410.7021 C 484.65927,410.7021 487.24592,411.64453 489.05056,413.48927 C 490.75495,415.23376 491.59712,417.5798 491.59712,420.52738 L 491.59712,423.15414 L 484.17803,423.15414 L 484.17803,420.46723 C 484.17803,417.86052 483.13534,416.53711 481.04998,416.53711 C 478.92451,416.53711 477.86178,417.86052 477.86178,420.46723 L 477.86178,435.36556 C 477.86178,438.47355 478.90446,440.03758 480.96977,440.03758 C 482.43354,440.03758 483.37596,439.53629 483.8171,438.53371 C 484.05772,437.97226 484.17803,436.92958 484.17803,435.36556 L 484.17803,432.7789 L 491.59712,432.7789 L 491.59712,435.54602 C 491.59712,442.42372 488.00788,445.87259 480.80936,445.87259 C 477.42064,445.87259 474.81394,444.84996 472.96919,442.82475 C 471.2648,440.98 470.42264,438.53371 470.42264,435.52597 z "
+     id="path2200" />
+  <path
+     d="M 505.20964,410.72065 C 502.04149,410.72065 499.44731,411.40744 497.50231,412.85113 C 495.4771,414.37505 494.49457,416.49298 494.49457,419.17991 L 494.49457,436.53707 C 494.49457,439.32424 495.40692,441.5149 497.25166,443.17916 C 499.11646,444.9036 501.66803,445.81097 504.89633,445.81093 C 508.18479,445.81093 510.75894,444.9913 512.60366,443.36714 C 514.44841,441.74297 515.36076,439.46705 515.36076,436.59973 L 515.36076,419.3679 C 515.36076,416.80129 514.4459,414.72599 512.541,413.10178 C 510.65615,411.49765 508.19731,410.72071 505.20964,410.72065 z M 504.83367,416.48548 C 506.93909,416.48548 508.02939,417.30507 508.02939,418.92927 L 508.02939,437.16368 C 508.02939,439.08864 506.93911,440.04614 504.83367,440.0461 C 502.88867,440.0461 501.95126,439.08868 501.95126,437.16368 L 501.95126,418.92927 C 501.95126,417.30509 502.88869,416.48552 504.83367,416.48548 z "
+     id="path2202" />
+  <path
+     d="M 521.29352,444.97027 L 521.29352,411.54427 L 528.57225,411.54427 L 528.57225,415.21371 C 531.29926,412.46664 534.04633,411.08308 536.81345,411.08308 C 540.18212,411.08308 541.8865,413.04814 541.8865,416.97825 L 541.8865,444.97027 L 534.66793,444.97027 L 534.66793,419.74537 C 534.66793,418.00088 534.02628,417.11861 532.74298,417.11861 C 531.51983,417.11861 530.11622,417.96078 528.57225,419.62506 L 528.57225,444.97027 L 521.29352,444.97027 z "
+     id="path2206" />
+  <path
+     d="M 549.36575,437.91211 L 549.36575,416.73763 L 544.91429,416.73763 L 545.95698,411.40391 L 549.36575,411.54427 L 549.36575,401.9195 L 556.58432,401.9195 L 556.58432,411.54427 L 561.91804,411.54427 L 561.91804,416.73763 L 556.58432,416.73763 L 556.58432,437.33061 C 556.58432,439.25557 557.64705,440.19799 559.75247,440.19799 C 560.21366,440.19799 560.93551,440.09773 561.89799,439.89722 L 561.91804,445.3312 C 560.65479,445.69213 559.25118,445.87259 557.74731,445.87259 C 552.17297,445.87259 549.36575,443.22578 549.36575,437.91211 z "
+     id="path2208" />
+  <path
+     d="M 565.40702,444.97027 L 565.40702,411.54427 L 572.68575,411.54427 L 572.68575,416.07593 C 574.53049,412.80752 577.0971,411.16329 580.3655,411.16329 L 581.08736,411.16329 L 581.08736,418.14124 C 580.40561,417.86052 579.6236,417.72016 578.72127,417.72016 C 574.71096,417.72016 572.68575,419.50475 572.68575,423.09398 L 572.68575,444.97027 L 565.40702,444.97027 z "
+     id="path2210" />
+  <path
+     d="M 593.43664,410.72065 C 590.26848,410.72065 587.67429,411.40744 585.72931,412.85113 C 583.70409,414.37505 582.72157,416.49298 582.72157,419.17991 L 582.72157,436.53707 C 582.72157,439.32424 583.63391,441.5149 585.47866,443.17916 C 587.34346,444.9036 589.89504,445.81097 593.12333,445.81093 C 596.41179,445.81093 598.98593,444.9913 600.83066,443.36714 C 602.67541,441.74297 603.58775,439.46705 603.58775,436.59973 L 603.58775,419.3679 C 603.58775,416.80129 602.67292,414.72599 600.768,413.10178 C 598.88315,411.49765 596.42434,410.72071 593.43664,410.72065 z M 593.06067,416.48548 C 595.16608,416.48548 596.25639,417.30507 596.25639,418.92927 L 596.25639,437.16368 C 596.25639,439.08864 595.16606,440.04614 593.06067,440.0461 C 591.11566,440.0461 590.17827,439.08868 590.17825,437.16368 L 590.17825,418.92927 C 590.17825,417.30509 591.11564,416.48552 593.06067,416.48548 z "
+     id="path2212" />
+  <path
+     d="M 622.23322,444.97027 L 622.23322,399.67373 L 632.94077,399.67373 L 638.23439,424.75827 C 638.71563,426.82358 638.9362,429.08941 638.9362,431.55575 C 638.9362,429.5907 639.17682,427.34492 639.65806,424.81842 L 644.69101,399.67373 L 655.65923,399.67373 L 655.65923,444.97027 L 647.99952,444.97027 L 647.99952,416.35665 C 647.99952,414.69237 648.22009,412.06561 648.68127,408.47637 C 648.68127,408.53653 648.52086,409.3787 648.20003,410.98282 C 647.95941,412.26613 647.69874,413.56948 647.39797,414.89288 L 640.801,444.97027 L 636.77063,444.97027 L 630.51453,414.85278 C 630.25386,413.34891 629.81273,411.22344 629.19113,408.47637 C 629.55206,411.78489 629.73252,414.4317 629.73252,416.35665 L 629.73252,444.97027 L 622.23322,444.97027 z "
+     id="path2216" />
+  <path
+     d="M 661.65465,444.97027 L 661.65465,411.54427 L 668.93338,411.54427 L 668.93338,444.97027 L 661.65465,444.97027 z "
+     id="path2218" />
+  <path
+     d="M 661.65465,405.88972 L 661.65465,399.67373 L 668.93338,399.67373 L 668.93338,405.88972 L 661.65465,405.88972 z "
+     id="path2220" />
+  <path
+     d="M 673.6856,444.97027 L 673.6856,411.54427 L 680.96433,411.54427 L 680.96433,415.21371 C 683.69135,412.46664 686.43842,411.08308 689.20554,411.08308 C 692.5742,411.08308 694.27859,413.04814 694.27859,416.97825 L 694.27859,444.97027 L 687.06002,444.97027 L 687.06002,419.74537 C 687.06002,418.00088 686.41836,417.11861 685.13506,417.11861 C 683.91192,417.11861 682.5083,417.96078 680.96433,419.62506 L 680.96433,444.97027 L 673.6856,444.97027 z "
+     id="path2222" />
+  <path
+     d="M 708.79594,410.65799 C 705.50748,410.65799 702.88573,411.57032 700.90063,413.41508 C 698.89547,415.27988 697.89287,417.62846 697.89289,420.4958 L 697.89289,435.47183 C 697.89289,442.42973 701.69768,445.88863 709.29723,445.74827 L 715.06206,444.2444 L 712.17964,439.35683 C 710.89634,439.77791 709.66566,439.98344 708.48263,439.98344 C 706.39727,439.98344 705.39218,438.39186 705.41223,435.28385 L 705.41223,431.9628 C 714.51565,432.28363 719.07238,428.84731 719.07238,421.74902 C 719.07238,417.73871 718.20517,414.86878 716.44061,413.16444 C 714.65602,411.46005 712.08438,410.65799 708.79594,410.65799 z M 708.54529,416.48548 C 710.55045,416.48548 711.57561,417.80638 711.61569,420.43314 L 711.74102,426.32329 L 705.41223,426.32329 L 705.41223,420.43314 C 705.39218,417.80638 706.43988,416.48552 708.54529,416.48548 z "
+     id="path2224" />
+  <path
+     d="M 721.80942,444.97027 L 721.80942,411.54427 L 729.08815,411.54427 L 729.08815,444.97027 L 721.80942,444.97027 z "
+     id="path2228" />
+  <path
+     d="M 721.80942,405.88972 L 721.80942,399.67373 L 729.08815,399.67373 L 729.08815,405.88972 L 721.80942,405.88972 z "
+     id="path2230" />
+  <path
+     d="M 733.84037,444.97027 L 733.84037,411.54427 L 741.1191,411.54427 L 741.1191,416.07593 C 742.96385,412.80752 745.53045,411.16329 748.79886,411.16329 L 749.52072,411.16329 L 749.52072,418.14124 C 748.83896,417.86052 748.05695,417.72016 747.15463,417.72016 C 743.14431,417.72016 741.1191,419.50475 741.1191,423.09398 L 741.1191,444.97027 L 733.84037,444.97027 z "
+     id="path2232" />
+  <path
+     d="M 761.86999,410.72065 C 758.70184,410.72065 756.10765,411.40744 754.16266,412.85113 C 752.13745,414.37505 751.15492,416.49298 751.15492,419.17991 L 751.15492,436.53707 C 751.15492,439.32424 752.06727,441.5149 753.91202,443.17916 C 755.77681,444.9036 758.3284,445.81097 761.55668,445.81093 C 764.84515,445.81093 767.41929,444.9913 769.26401,443.36714 C 771.10876,441.74297 772.02111,439.46705 772.02111,436.59973 L 772.02111,419.3679 C 772.02111,416.80129 771.10627,414.72599 769.20135,413.10178 C 767.3165,411.49765 764.8577,410.72071 761.86999,410.72065 z M 761.49402,416.48548 C 763.59944,416.48548 764.68975,417.30507 764.68975,418.92927 L 764.68975,437.16368 C 764.68975,439.08864 763.59942,440.04614 761.49402,440.0461 C 759.54902,440.0461 758.61163,439.08868 758.61161,437.16368 L 758.61161,418.92927 C 758.61161,417.30509 759.549,416.48552 761.49402,416.48548 z "
+     id="path2234" />
+  <path
+     d="M 803.35172,399.69227 L 803.35172,414.22968 C 801.36661,412.14435 799.2261,411.09662 796.96027,411.09662 C 792.28823,411.09666 790.00488,413.89883 790.00488,419.49322 L 790.00488,438.04094 C 790.0049,442.9536 792.1504,445.43496 796.52164,445.43496 C 799.22859,445.43502 801.52702,444.43238 803.35172,442.42723 L 803.35172,444.99634 L 810.68308,444.99634 L 810.68308,399.69227 L 803.35172,399.69227 z M 800.40664,416.42282 C 801.44934,416.42278 802.40929,416.89905 803.35172,417.80137 L 803.35172,438.60489 C 802.26893,439.62748 801.15106,440.10876 799.96801,440.10876 C 798.2837,440.1087 797.3989,439.10618 797.3989,437.10102 L 797.3989,419.86919 C 797.39888,417.58335 798.42153,416.42282 800.40664,416.42282 z "
+     id="path2238" />
+  <path
+     d="M 825.09516,410.65799 C 821.8067,410.65799 819.18495,411.57032 817.19985,413.41508 C 815.19469,415.27988 814.19209,417.62846 814.19211,420.4958 L 814.19211,435.47183 C 814.19211,442.42973 817.9969,445.88863 825.59645,445.74827 L 831.36128,444.2444 L 828.47887,439.35683 C 827.19556,439.77791 825.96488,439.98344 824.78185,439.98344 C 822.69649,439.98344 821.6914,438.39186 821.71145,435.28385 L 821.71145,431.9628 C 830.81488,432.28363 835.3716,428.84731 835.3716,421.74902 C 835.3716,417.73871 834.50439,414.86878 832.73983,413.16444 C 830.95524,411.46005 828.3836,410.65799 825.09516,410.65799 z M 824.84452,416.48548 C 826.84967,416.48548 827.87483,417.80638 827.91492,420.43314 L 828.04024,426.32329 L 821.71145,426.32329 L 821.71145,420.43314 C 821.6914,417.80638 822.7391,416.48552 824.84452,416.48548 z "
+     id="path2242" />
+  <path
+     d="M 417.26587,491.62574 L 425.02584,490.64322 C 425.32661,495.11472 427.1112,497.3605 430.41971,497.3605 C 431.94364,497.3605 433.14673,496.95947 434.04905,496.13735 C 434.97143,495.33529 435.43261,494.27255 435.43261,492.98925 C 435.43261,490.62316 433.22694,487.59537 428.83564,483.86578 L 428.07368,483.20408 C 424.72506,480.31665 422.43918,478.11097 421.21603,476.6071 C 419.07051,473.94024 418.00778,471.21323 418.00778,468.42605 C 418.00778,465.27795 419.21088,462.61109 421.59702,460.38537 C 424.00321,458.17969 427.01094,457.0568 430.64028,457.0568 C 434.28967,457.0568 437.2172,458.17969 439.40283,460.38537 C 441.40799,462.41058 442.55093,465.05739 442.8517,468.28569 L 434.89122,469.26822 C 434.6105,465.49852 433.12668,463.61367 430.41971,463.61367 C 427.53229,463.61367 426.08857,465.01728 426.08857,467.80445 C 426.08857,470.43121 428.63512,473.86004 433.74828,478.11097 L 434.22952,478.512 C 437.35756,481.11871 439.52314,483.24418 440.68613,484.86836 C 442.45067,487.2946 443.35299,489.96146 443.35299,492.84889 C 443.35299,496.09725 442.19,498.78416 439.84396,500.92968 C 437.51798,503.09525 434.47014,504.15799 430.72049,504.15799 C 426.4896,504.15799 423.18109,502.95489 420.79495,500.56875 C 418.62938,498.34303 417.44634,495.37539 417.26587,491.62574 z "
+     id="path2246" />
+  <path
+     d="M 457.14848,468.88564 C 453.96028,468.88564 451.38616,469.5726 449.44115,471.01632 C 447.39589,472.54004 446.37075,474.65809 446.37075,477.345 L 446.37075,494.70206 C 446.37075,497.48923 447.28312,499.68007 449.12785,501.34435 C 451.0127,503.06879 453.58682,503.97612 456.83518,503.97592 C 460.14369,503.97592 462.74035,503.15641 464.60517,501.53223 C 466.46997,499.90805 467.36224,497.6322 467.36226,494.76482 L 467.36226,477.53309 C 467.36226,474.96648 466.4048,472.89114 464.47985,471.26696 C 462.57495,469.66284 460.15622,468.88584 457.14848,468.88564 z M 456.83518,474.65047 C 458.96065,474.65047 459.96824,475.47018 459.96824,477.09436 L 459.96824,495.32887 C 459.96824,497.25382 458.96065,498.21129 456.83518,498.21109 C 454.87012,498.21109 453.8901,497.25382 453.8901,495.32887 L 453.8901,477.09436 C 453.8901,475.47018 454.87012,474.65067 456.83518,474.65047 z "
+     id="path2248" />
+  <path
+     d="M 472.16713,503.13536 L 472.16713,474.90272 L 468.05655,474.90272 L 468.05655,469.70936 L 472.16713,469.70936 L 472.16713,465.7993 C 472.16713,460.48562 474.97435,457.83881 480.58879,457.83881 C 482.03251,457.83881 483.43612,457.99923 484.79963,458.3401 L 484.79963,463.77409 L 482.85462,463.47331 C 480.54869,463.47331 479.40575,464.41574 479.40575,466.28053 L 479.40575,469.70936 L 484.03767,469.70936 L 484.03767,474.90272 L 479.40575,474.90272 L 479.40575,503.13536 L 472.16713,503.13536 z "
+     id="path2252" />
+  <path
+     d="M 489.25108,496.0772 L 489.25108,474.90272 L 484.75952,474.90272 L 485.82226,469.56899 L 489.25108,469.70936 L 489.25108,460.08459 L 496.4897,460.08459 L 496.4897,469.70936 L 501.88358,469.70936 L 501.88358,474.90272 L 496.4897,474.90272 L 496.4897,495.4957 C 496.4897,497.42065 497.57249,498.36308 499.69796,498.36308 C 500.15914,498.36308 500.881,498.26282 501.84348,498.0623 L 501.88358,503.49629 C 500.60028,503.85721 499.19667,504.03768 497.67275,504.03768 C 492.0583,504.03768 489.25108,501.39087 489.25108,496.0772 z "
+     id="path2254" />
+  <path
+     d="M 501.76327,469.70936 L 508.70112,469.70936 L 511.6086,485.71052 C 511.90938,487.37481 512.15,490.08177 512.37056,493.89157 C 512.43072,491.70595 512.75154,488.97893 513.33304,485.75063 L 516.24052,469.70936 L 521.79481,469.70936 L 525.00306,485.75063 C 525.56451,488.5779 525.90539,491.30492 526.0658,493.89157 L 526.0658,492.54812 C 526.0658,489.66069 526.18611,487.39486 526.44678,485.73058 L 529.31416,469.70936 L 536.07154,469.70936 L 529.43447,503.13536 L 523.07811,503.13536 L 519.7295,486.83341 C 519.40867,485.26939 519.16805,482.74289 519.02769,479.23386 C 518.92743,480.93825 518.68681,483.4848 518.30583,486.87352 L 515.45851,503.13536 L 509.02195,503.13536 L 501.76327,469.70936 z "
+     id="path2256" />
+  <path
+     d="M 548.38322,468.9484 L 542.55573,470.45227 L 545.5008,475.27728 C 546.80416,474.87625 548.01477,474.71323 549.19781,474.71323 C 551.32328,474.71323 552.41357,476.24216 552.39354,479.35016 L 552.39354,482.73387 C 543.16981,482.43309 538.54541,485.78672 538.54541,492.88498 C 538.54541,496.8953 539.45527,499.78534 541.23984,501.46947 C 543.02443,503.17386 545.57598,504.03868 548.88451,504.03868 C 552.19302,504.03868 554.85986,503.10388 556.90514,501.21883 C 558.8702,499.39413 559.85022,497.06835 559.85022,494.20077 L 559.85022,479.16208 C 559.85022,472.20417 556.02287,468.82809 548.38322,468.9484 z M 545.93943,488.37338 L 552.39354,488.37338 L 552.39354,494.26353 C 552.41359,496.87024 551.30073,498.21129 549.13515,498.21109 C 547.08989,498.21109 546.06223,496.87024 546.00209,494.26353 L 545.93943,488.37338 z "
+     id="path2258" />
+  <path
+     d="M 563.42191,503.13536 L 563.42191,469.70936 L 570.76079,469.70936 L 570.76079,474.24102 C 572.60554,470.97261 575.17214,469.32838 578.4606,469.32838 L 579.20251,469.32838 L 579.20251,476.30633 C 578.52076,476.02561 577.71869,475.88525 576.81637,475.88525 C 572.76595,475.88525 570.76079,477.66984 570.76079,481.25907 L 570.76079,503.13536 L 563.42191,503.13536 z "
+     id="path2262" />
+  <path
+     d="M 590.61688,468.82308 C 587.30837,468.82308 584.60138,469.73542 582.59624,471.58017 C 580.59109,473.44497 579.58849,475.79361 579.58851,478.66079 L 579.58851,493.63692 C 579.58851,500.59482 583.41583,504.05372 591.05551,503.91336 L 596.883,502.40949 L 594.00059,497.52191 C 592.69723,497.943 591.42394,498.14853 590.24091,498.14853 C 588.1355,498.14853 587.13041,496.55703 587.17051,493.44883 L 587.17051,490.12789 C 596.33409,490.44872 600.89332,487.01247 600.89332,479.91401 C 600.89332,475.90369 600.04616,473.03391 598.26155,471.32952 C 596.47696,469.62514 593.92541,468.82308 590.61688,468.82308 z M 590.30357,474.65047 C 592.30873,474.65047 593.33385,475.97147 593.37397,478.59823 L 593.4993,484.48838 L 587.17051,484.48838 L 587.17051,478.59823 C 587.13041,475.97147 588.17811,474.65067 590.30357,474.65047 z "
+     id="path2264" />
+  <path
+     d="M 642.90641,503.13536 L 643.48791,496.35792 C 639.49764,496.39802 637.29197,496.41807 636.89094,496.45818 C 636.48991,496.49828 636.14903,496.51833 635.84825,496.51833 C 633.00093,496.51833 631.57727,495.25508 631.57727,492.72858 L 631.57727,458.09949 L 623.43632,458.09949 L 623.43632,491.38512 C 623.43632,495.47565 624.21833,498.48339 625.78236,500.44844 C 627.40653,502.49371 629.79267,503.47623 632.94077,503.39603 L 642.90641,503.13536 z "
+     id="path2268" />
+  <path
+     d="M 645.63343,503.13536 L 645.63343,469.70936 L 652.97231,469.70936 L 652.97231,503.13536 L 645.63343,503.13536 z "
+     id="path2270" />
+  <path
+     d="M 645.63343,464.05481 L 645.63343,457.83881 L 652.97231,457.83881 L 652.97231,464.05481 L 645.63343,464.05481 z "
+     id="path2272" />
+  <path
+     d="M 654.15536,469.70936 L 660.87264,469.70936 L 665.32409,490.30234 L 665.68502,490.28229 L 669.39456,469.70936 L 676.57303,469.70936 L 669.05369,503.13536 L 662.37651,503.13536 L 654.15536,469.70936 z "
+     id="path2274" />
+  <path
+     d="M 677.71597,503.13536 L 677.71597,469.70936 L 685.05486,469.70936 L 685.05486,474.24102 C 686.8996,470.97261 689.46621,469.32838 692.75467,469.32838 L 693.49658,469.32838 L 693.49658,476.30633 C 692.81482,476.02561 692.01276,475.88525 691.11044,475.88525 C 687.06002,475.88525 685.05486,477.66984 685.05486,481.25907 L 685.05486,503.13536 L 677.71597,503.13536 z "
+     id="path2276" />
+  <path
+     d="M 706.9161,468.82308 C 703.60759,468.82308 700.90061,469.73542 698.89547,471.58017 C 696.89031,473.44497 695.88771,475.79361 695.88773,478.66079 L 695.88773,493.63692 C 695.88773,500.59482 699.71505,504.05372 707.35473,503.91336 L 713.18222,502.40949 L 710.29981,497.52191 C 708.99645,497.943 707.72316,498.14853 706.54013,498.14853 C 704.43472,498.14853 703.42963,496.55703 703.46974,493.44883 L 703.46974,490.12789 C 712.63331,490.44872 717.19254,487.01247 717.19254,479.91401 C 717.19254,475.90369 716.34538,473.03391 714.56077,471.32952 C 712.77618,469.62514 710.22463,468.82308 706.9161,468.82308 z M 706.6028,474.65047 C 708.60796,474.65047 709.63307,475.97147 709.6732,478.59823 L 709.79852,484.48838 L 703.46974,484.48838 L 703.46974,478.59823 C 703.42963,475.97147 704.47733,474.65067 706.6028,474.65047 z "
+     id="path2278" />
+  <path
+     d="M 290.97125,349.68831 L 235.83921,448.64268 L 349.42857,433.45011 L 290.97125,349.68831 z "
+     id="path2282"
+     style="fill:url(#linearGradient2229);fill-opacity:1"
+     sodipodi:nodetypes="cccc" />
+  <path
+     style="opacity:1;color:#000000;fill:#cccccc;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+     d="M 157.35328,422.64874 C 156.67581,422.78429 156.25311,423.4599 156.60003,424.24064 L 170.04292,457.41545 L 175.42046,452.01895 C 176.11383,451.5192 176.82303,451.44066 177.56639,452.27124 C 180.95611,455.98437 192.68608,469.36206 194.17938,470.58077 C 203.18411,477.83486 214.75268,473.81043 214.75268,473.81041 L 392.52448,429.44653 C 392.52448,429.44653 402.40854,425.9337 389.40898,428.09383 C 340.1079,436.28804 218.80204,456.54566 213.66107,457.24597 C 204.61466,459.34459 198.54021,454.31175 198.54021,454.31177 L 186.69753,443.39126 C 185.73418,442.59731 186.46236,441.7398 186.7445,440.89904 L 191.76843,435.55285 L 158.10627,422.71425 C 157.84441,422.62292 157.57911,422.60355 157.35328,422.64874 z "
+     id="path3225"
+     sodipodi:nodetypes="cccccccccccccccc"
+     inkscape:transform-center-x="121.33214"
+     inkscape:transform-center-y="-19.010843" />
+  <path
+     style="opacity:1;color:#000000;fill:#000000;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:butt;stroke-linejoin:miter;marker:none;marker-start:none;marker-mid:none;marker-end:none;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+     d="M 159.21792,413.6568 C 158.53584,413.76682 158.08806,414.42608 158.40542,415.2193 L 170.59292,448.87555 L 176.16933,443.68482 C 176.88098,443.21146 177.59263,443.15961 178.30428,444.01752 C 181.55216,447.85534 192.77145,461.66412 194.21792,462.93805 C 202.94387,470.5252 214.65542,466.93807 214.65542,466.93805 L 393.96792,429.2818 C 393.96792,429.2818 403.97694,426.14265 390.90542,427.81305 C 341.33138,434.14994 219.35031,449.83756 214.18667,450.3443 C 205.06783,452.1017 199.18667,446.84428 199.18667,446.8443 L 187.76247,435.48674 C 186.82962,434.65717 187.58949,433.82761 187.903,432.99804 L 193.12417,427.8443 L 159.96792,413.75055 C 159.70968,413.64945 159.44528,413.62013 159.21792,413.6568 z "
+     id="path2290"
+     sodipodi:nodetypes="cccccccccccccccc"
+     inkscape:transform-center-x="119.66485"
+     inkscape:transform-center-y="-27.071872" />
+  <path
+     style="fill:#cccccc;fill-opacity:1"
+     d="M 259.59274,304.59951 C 259.27253,304.62918 259.40823,305.26768 260.71345,307.2371 C 280.46244,337.14931 337.38751,428.74156 348.90682,446.35779 C 354.58223,455.07486 351.22874,460.32959 351.22874,460.32959 L 342.20201,477.11972 C 341.27792,479.01054 340.45758,478.13478 339.61168,477.94038 L 333.2407,473.85265 L 327.99428,509.52487 C 327.86438,510.62659 328.88077,511.33269 329.79692,510.65571 L 359.26628,490.3393 L 352.98832,486.55788 C 351.44084,485.59516 351.91769,484.8754 352.35078,483.81988 C 355.03018,480.10096 364.63274,467.3468 365.87863,464.94421 C 374.82363,451.97564 363.11241,438.63456 363.11241,438.63459 L 261.97232,306.18978 C 261.97232,306.18978 260.12643,304.55007 259.59274,304.59951 z "
+     id="path3221"
+     sodipodi:nodetypes="cccccccccccccccc"
+     inkscape:transform-center-x="-54.892047"
+     inkscape:transform-center-y="103.16765" />
+  <path
+     style="fill:#000000;fill-opacity:1"
+     d="M 259.59292,304.5943 C 259.27404,304.63594 259.43358,305.26892 260.81167,307.18805 C 281.66748,336.33933 341.98418,425.73453 354.15542,442.9068 C 360.15343,451.40512 356.99917,456.7818 356.99917,456.7818 L 348.60784,473.89834 C 347.75525,475.82245 346.90267,474.97804 346.05008,474.81547 L 339.53042,470.9693 L 335.62417,506.81305 C 335.53565,507.91886 336.57778,508.58638 337.46792,507.87555 L 366.15542,486.4693 L 359.7402,482.92575 C 358.15773,482.02169 358.60728,481.28456 359.00052,480.21356 C 361.5387,476.39686 370.65668,463.29189 371.81167,460.8443 C 380.26451,447.54971 368.06167,434.65677 368.06167,434.6568 L 262.03042,306.0943 C 262.03042,306.0943 260.12438,304.5249 259.59292,304.5943 z "
+     id="path2296"
+     sodipodi:nodetypes="cccccccccccccccc" />
+  <path
+     d="M 264.56949,259.55793 C 263.91765,259.53653 263.38148,260.05427 263.5321,260.84654 L 268.71731,294.23451 L 274.27303,290.45721 C 275.30964,290.04993 276.0613,290.00426 277.03541,291.16448 L 286.80966,309.90779 C 286.80967,309.9078 289.39627,317.273 286.80322,321.85722 C 282.18032,332.6875 213.37913,486.81133 213.37913,486.81133 C 211.3669,490.88538 211.07103,495.14607 215.20433,486.59924 L 300.25957,328.11916 C 300.25957,328.11916 308.21936,316.67973 300.13352,301.59706 C 298.44976,298.99924 290.04106,288.46668 287.66399,285.23401 C 286.84446,284.11491 286.92703,283.44088 287.65129,282.22299 L 293.41161,278.83075 L 265.22231,259.75192 C 265.00132,259.61154 264.78677,259.56506 264.56949,259.55793 z "
+     id="path2240"
+     sodipodi:nodetypes="cccccccccccccccc"
+     inkscape:transform-center-y="-115.99932"
+     inkscape:transform-center-x="-45.902435"
+     style="fill:#cccccc" />
+  <path
+     d="M 269.96792,250.7818 C 269.27795,250.74587 268.69953,251.28332 268.84292,252.12555 L 273.65542,287.5943 L 279.61671,283.7066 C 280.72292,283.29632 281.51998,283.26326 282.5281,284.51194 L 292.49917,304.56305 C 292.49918,304.56306 295.08892,312.41662 292.24917,317.2193 C 287.13236,328.59622 211.12417,490.43805 211.12417,490.43805 C 208.90998,494.71218 208.5099,499.21892 213.06167,490.25055 L 306.37417,324.12555 C 306.37416,324.12555 315.03768,312.17134 306.78042,296.0318 C 305.04992,293.24603 296.35809,281.91922 293.90618,278.44691 C 293.06094,277.24493 293.16211,276.5327 293.95401,275.2575 L 300.12417,271.7818 L 270.65542,251.00055 C 270.42422,250.84738 270.19791,250.79378 269.96792,250.7818 z "
+     id="path2306"
+     sodipodi:nodetypes="cccccccccccccccc" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer1" />
+  <g
+     inkscape:groupmode="layer"
+     id="layer2"
+     inkscape:label="rrr" />
+  <path
+     style="fill:#000000;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0"
+     d="M 223.19439,449.55148 L 249.85663,446.00329 L 251.15856,457.90114 L 214.6283,465.9071 L 223.19439,449.55148 z "
+     id="path3227"
+     sodipodi:nodetypes="ccccc" />
+  <path
+     style="fill:#cccccc;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:0"
+     d="M 220.88003,465.54779 L 233.73144,463.06197 L 224.17357,471.41858 L 216.68148,473.16835 L 220.88003,465.54779 z "
+     id="path4198"
+     sodipodi:nodetypes="ccccc" />
+</svg>
diff --git a/media/imgs/menu_avaliacao.gif b/media/imgs/menu_avaliacao.gif
new file mode 100644 (file)
index 0000000..abb8be5
Binary files /dev/null and b/media/imgs/menu_avaliacao.gif differ
diff --git a/media/imgs/menu_chamada-de-trabalhos.gif b/media/imgs/menu_chamada-de-trabalhos.gif
new file mode 100644 (file)
index 0000000..0860612
Binary files /dev/null and b/media/imgs/menu_chamada-de-trabalhos.gif differ
diff --git a/media/imgs/menu_como-chegar.gif b/media/imgs/menu_como-chegar.gif
new file mode 100644 (file)
index 0000000..0e15990
Binary files /dev/null and b/media/imgs/menu_como-chegar.gif differ
diff --git a/media/imgs/menu_contato.gif b/media/imgs/menu_contato.gif
new file mode 100644 (file)
index 0000000..f08d9c0
Binary files /dev/null and b/media/imgs/menu_contato.gif differ
diff --git a/media/imgs/menu_home.gif b/media/imgs/menu_home.gif
new file mode 100644 (file)
index 0000000..43b5f5a
Binary files /dev/null and b/media/imgs/menu_home.gif differ
diff --git a/media/imgs/menu_inscricao.gif b/media/imgs/menu_inscricao.gif
new file mode 100644 (file)
index 0000000..9b19014
Binary files /dev/null and b/media/imgs/menu_inscricao.gif differ
diff --git a/media/imgs/menu_localizacao.gif b/media/imgs/menu_localizacao.gif
new file mode 100644 (file)
index 0000000..e7c7f6b
Binary files /dev/null and b/media/imgs/menu_localizacao.gif differ
diff --git a/media/imgs/menu_onde-comer.gif b/media/imgs/menu_onde-comer.gif
new file mode 100644 (file)
index 0000000..3b125be
Binary files /dev/null and b/media/imgs/menu_onde-comer.gif differ
diff --git a/media/imgs/menu_onde-ficar.gif b/media/imgs/menu_onde-ficar.gif
new file mode 100644 (file)
index 0000000..dbc5369
Binary files /dev/null and b/media/imgs/menu_onde-ficar.gif differ
diff --git a/media/imgs/menu_programacao.gif b/media/imgs/menu_programacao.gif
new file mode 100644 (file)
index 0000000..899097f
Binary files /dev/null and b/media/imgs/menu_programacao.gif differ
diff --git a/media/imgs/menu_retrospectiva.gif b/media/imgs/menu_retrospectiva.gif
new file mode 100644 (file)
index 0000000..9e63f8b
Binary files /dev/null and b/media/imgs/menu_retrospectiva.gif differ
diff --git a/media/imgs/tit_patrocinio.gif b/media/imgs/tit_patrocinio.gif
new file mode 100644 (file)
index 0000000..78d5052
Binary files /dev/null and b/media/imgs/tit_patrocinio.gif differ
index b52e14d..31449db 100644 (file)
@@ -1,3 +1,4 @@
+# -*- coding: utf-8; -*-
 # Django settings for eventmanager project.
 import os
 
@@ -24,7 +25,7 @@ DATABASE_PORT = ''             # Set to empty string for default. Not used with
 # although not all variations may be possible on all operating systems.
 # If running in a Windows environment this must be set to the same as your
 # system time zone.
-TIME_ZONE = 'America/Sao_paulo'
+TIME_ZONE = 'America/Sao_Paulo'
 
 # Language code for this installation. All choices can be found here:
 # http://www.w3.org/TR/REC-html40/struct/dirlang.html#langcodes
@@ -85,3 +86,6 @@ INSTALLED_APPS = (
     'eventmanager.eventos',
     'eventmanager.conteudo',
 )
+
+# código mínimo já utilizado em testes de geração de boletos.
+MIN_REF_TRAN = 10
index 79f3eae..bcf58f1 100644 (file)
@@ -1,71 +1,84 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
-"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
 {% load i18n %}
 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pt_BR" lang="pt_BR">
     <head>
-        <title>Encontro Mineiro de Software Livre</title>
-        <link rel="stylesheet" type="text/css" href="/site_media/css/geral.css" />
+        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+        <link href="/site_media/css/geral.css" rel="stylesheet" type="text/css" />
+        <title>EMSL'07 &mdash; Encontro Mineiro de Software Livre</title>
     </head>
     <body>
-        <div id="headsection">
-            <h1 class="title"><a href="/">Encontro Mineiro de Software Livre</a></h1>
+        <div id="top">
+            <h1>EMSL 2007 - Encontro Mineiro de Software Livre</h1>
+            <h2>18 a 20 de outubro de 2007 - DCC/UFLA - Lavras/MG</h2>
 
             {% if user.is_authenticated %}
 
-                {% if user.palestrante_set.all %}
-                <div id="menu-palestrante">
-                    <h3>Menu do palestrante</h3>
-                    <ul>
-                        <li><a href="/submeter_trabalho">Submeter Trabalho</a></li>
-                        <li><a href="/meus_trabalhos">Trabalhos inscritos</a></li>
-                        <li><a href="/meus_dados">Editar dados de usuário</a></li>
-                        <li><a href="/logout">Sair ({{ user }})</a></li>
-                    </ul>
-                </div>
-                {% endif %}
+            <form id="menu-palestrante">
+                <ul>
+                    <li><a href="/meus_dados">Editar dados de usuário</a></li>
 
-            {% else %}
+                    {% if user.palestrante_set.all %}
+                    <li><a href="/submeter_trabalho">Submeter Trabalho</a></li>
+                    <li><a href="/meus_trabalhos">Trabalhos inscritos</a></li>
+                    {% else %}
 
-            {{ request.error_message }}
+                        {% if user.participante_set.all %}
+                        <li><a href="/boleto">Emitir boleto</a></li>
+                        {% endif %}
 
-            <form id="login-form" method="post" action=".">
-                <div class="field">
-                    <label for="id_username">Usuário:</label>
-                    <input id="id_username" class="vTextField required" type="text"
-                           maxlength="30" name="username" />
-                </div>
-                <div class="field">
-                    <label for="id_password-login">Senha:</label>
-                    <input id="id_password-login" class="vTextField required"
-                           type="password" name="password" />
+                    {% endif %}
 
-                    <input type="submit" value="Login" class="submit" name="submitting_login_form" />
-                </div>
+                    <li><a href="/logout">Sair ({{ user }})</a></li>
+                </ul>
             </form>
-            {% endif %}
+            <br /><br />
 
-        </div>
+            {% else %}
 
-        <ul id="menu">
-            <li><a href="/inscricao">Inscrição</a></li>
-            <li><a href="/chamada_trabalhos">Chamada de trabalhos</a></li>
-            <li><a href="/avaliacao">Avaliação</a></li>
+            <form id="login-form" method="post" action=".">
+                <input type="hidden" name="submitting_login_form" value="1" />
+                <label for="login">usuário</label>
+                <input type="text" name="username" id="login"
+                    {% if login_failed %}class="login-failed"{% endif %} />
+                <label for="senha">senha</label>
+                <input type="password" name="password" id="senha"
+                    {% if login_failed %}class="login-failed"{% endif %} />
+                <input type="image" src="/site_media/imgs/bt_entrar.gif" alt="OK" style="border:0;width:auto;" />
+            </form>
 
-            {% for i in menu %}
-            <li><a href="/secao/{{ i.secao.id }}">{{ i.titulo }}</a></li>
-            {% endfor %}
-        </ul>
+            {% endif %}
+        </div>
 
-        <div id="content">
-        {% block content %}{% endblock %}
+        <div id="container">
+            <ul id="menu">
+                <li><a href="/"><img src="/site_media/imgs/menu_home.gif" alt="Home" /></a></li>
+                <li><a href="/inscricao"><img src="/site_media/imgs/menu_inscricao.gif" alt="Inscrição" /></a></li>
+               <!--
+                <li><a href="/chamada_trabalhos"><img src="/site_media/imgs/menu_chamada-de-trabalhos.gif" alt="Chamada de Trabalhos" /></a></li>
+               -->
+                <!--<li><a href="/secao/2"><img src="/site_media/imgs/menu_programacao.gif" alt="Programação" /></a></li>-->
+                <!-- hackish session... -->
+                <li><a href="/secao/2"><img src="/site_media/imgs/menu_localizacao.gif" alt="Localização" /></a></li>
+                <li><a href="/secao/3"><img src="/site_media/imgs/menu_como-chegar.gif" alt="Como Chegar" /></a></li>
+                <li><a href="/secao/4"><img src="/site_media/imgs/menu_onde-ficar.gif" alt="Onde Ficar" /></a></li>
+                <li><a href="/secao/5"><img src="/site_media/imgs/menu_onde-comer.gif" alt="Onde Comer" /></a></li>
+
+                <li><a href="mailto:emsl@minaslivre.org"><img src="/site_media/imgs/menu_contato.gif" alt="Contato" /></a></li>
+            </ul>
+            <div id="content">
+            {% block content %}{% endblock %}
+            </div>
         </div>
 
         <div id="footer">
-            <strong>Encontro Mineiro de Software Livre 2007 © Copyleft</strong>
-            <address><a href="mailto:emsl@minaslivre.org">emsl@minaslivre.org</a></address>
+            <div id="org"><img src="/site_media/imgs/el_footer.gif" alt="Organização: DCC/UFLA e Minas Livre" /></div>
+            <div id="patrocinio">
+                <h3>Patrocínio</h3>
+                <table>
+                    <tr><td><!-- placeholder --> &nbsp;</td></tr>
+                </table>
+            </div>
         </div>
-
     </body>
 </html>
-{# vim: set ft=htmldjango: #}
+{# vim:set ft=htmldjango: #}
index 9027481..4b7ca0e 100644 (file)
@@ -6,9 +6,11 @@
 {% if ok %}
 
 <div class="confirmation">
-    <p>Cadastro efetuado com sucesso, você já foi autenticado.</p>
+    <p>Cadastro efetuado com sucesso!</p>
 
-    <p>Use o menu que apareceu para cadastrar uma palestra ou um minicurso</p>
+    <p>Foi enviado um email de confirmação para o endereço {{ email }}.</p>
+    <p>Siga as instruções do email para concluir o cadastro e prosseguir
+    com a submissão de trabalhos.</p>
 </div>
 
 {% else %}
diff --git a/templates/editar_palestrante.html b/templates/editar_palestrante.html
deleted file mode 100644 (file)
index b92c0ec..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-{% extends "base.html" %}
-{% block content %}
-
-<h2>Editar Palestrante</h2>
-
-{% if ok %}
-
-<div class="confirmation">
-    <p>Seus dados foram editados com sucesso!</p>
-</div>
-
-{% else %}
-
-<form id="cadastro" method="post" action=".">
-    {{ form.as_p }}
-    <input type="submit" value="Salvar" />
-</form>
-
-{% endif %}
-
-{% endblock %}
diff --git a/templates/editar_usuario.html b/templates/editar_usuario.html
new file mode 100644 (file)
index 0000000..d42402c
--- /dev/null
@@ -0,0 +1,21 @@
+{% extends "base.html" %}
+{% block content %}
+
+<h2>Editar {{ title }}</h2>
+
+{% if ok %}
+
+<div class="confirmation">
+    <p>Seus dados foram editados com sucesso!</p>
+</div>
+
+{% else %}
+
+<form id="cadastro" method="post" action=".">
+    {{ form.as_p }}
+    <input type="submit" value="Salvar" />
+</form>
+
+{% endif %}
+
+{% endblock %}
diff --git a/templates/email-palestrante.html b/templates/email-palestrante.html
new file mode 100644 (file)
index 0000000..3e5b91d
--- /dev/null
@@ -0,0 +1,10 @@
+Olá {{ fulano }}!
+
+Seu cadastro de palestrante para o Encontro Mineiro de Software Livre de 2007
+precisa ser confirmado, por favor siga o link abaixo, ou cole no seu navegador:
+
+{{ link }}
+
+Mais informações em http://emsl.minaslivre.org
+
+Caso você não tenha feito nenhum cadastro, por favor desconsidere este email.
index 33e3de0..271fad8 100644 (file)
@@ -1,21 +1,23 @@
 {% extends "base.html" %}
 {% block content %}
 
-<h2>Inscrição do participante</h2>
+<h2>Inscrição</h2>
 
-{% if ok %}
+<h3>Informações</h3>
+<ul id="info-preco">
+    <li><strong>Inscrição individual</strong> até o dia 12/10/2007 R$ 35,00
+    e no local R$50,00</li>
 
-<div class="confirmation">
-    <p>Cadastro efetuado com sucesso, você já foi autenticado.</p>
-</div>
+    <li><strong>Inscrição individual comercial</strong> até o dia
+    12/10/2007 e no local R$ 80,00</li> 
 
-{% else %}
+    <li><strong>Inscrição de caravanas</strong> até o dia 09/10/2007: R$ 25,00
+    por pessoa (mínimo de 10 pessoas por caravana)</li>
+</ul>
 
-<form id="cadastro" method="post" action=".">
-    {{ form.as_p }}
-    <input type="submit" value="Ok!" />
-</form>
+<br />
 
-{% endif %}
+<h3><a href="/inscricao_individual">Inscrição Individual</a></h3>
+<h3><a href="/inscricao_caravana">Inscrição de Caravana</a></h3>
 
 {% endblock %}
diff --git a/templates/inscricao_caravana.html b/templates/inscricao_caravana.html
new file mode 100644 (file)
index 0000000..38fd346
--- /dev/null
@@ -0,0 +1,22 @@
+{% extends "base.html" %}
+{% block content %}
+
+<h2>Inscrição de Caravana</h2>
+
+{% if ok %}
+
+<div class="confirmation">
+    <p>Cadastro efetuado com sucesso.</p>
+</div>
+
+{% else %}
+
+<form id="cadastro" method="post" action=".">
+    {{ form.as_p }}
+
+    <input type="submit" value="Ok" />
+</form>
+
+{% endif %}
+
+{% endblock %}
diff --git a/templates/inscricao_individual.html b/templates/inscricao_individual.html
new file mode 100644 (file)
index 0000000..5a060a4
--- /dev/null
@@ -0,0 +1,21 @@
+{% extends "base.html" %}
+{% block content %}
+
+<h2>Inscrição Individual</h2>
+
+{% if ok %}
+
+<div class="confirmation">
+    <p>Cadastro efetuado com sucesso.</p>
+</div>
+
+{% else %}
+
+<form id="cadastro" method="post" action=".">
+    {{ form.as_p }}
+    <input type="submit" value="Ok" />
+</form>
+
+{% endif %}
+
+{% endblock %}
index 14bc58e..465c1ba 100644 (file)
@@ -5,9 +5,9 @@
 
 {# o if abaixo eh para o caso de algum trabalho ter sido editado e redirecionado #}
 {% if editado_sucesso %}
-  <br />
-  <h4>O trabalho "{{ editado_sucesso}}" for editado com sucesso!</h4>
-  <br />
+<div class="confirmation">
+    <p>O trabalho "{{ editado_sucesso }}" for editado com sucesso!</p>
+</div>
 {% endif %}
 
 {% if trabalhos %}
diff --git a/urls.py b/urls.py
index cf93987..1ebcff7 100644 (file)
--- a/urls.py
+++ b/urls.py
@@ -28,7 +28,12 @@ urlpatterns = patterns('',
     (r'^admin/', include('django.contrib.admin.urls')),
     (r'^logout/', 'django.contrib.auth.views.logout',
         {'next_page': '/'}),
+
     (r'^inscricao/', views.inscricao),
+    (r'^inscricao_individual/', views.inscricao_individual),
+    (r'^inscricao_caravana/', views.inscricao_caravana),
+    (r'^boleto/', views.inscricao_boleto),
+
     (r'^submeter_trabalho/', views.submeter_trabalho),
     (r'^cadastro_palestrante/', views.cadastro_palestrante),
     (r'^meus_trabalhos/', views.meus_trabalhos),
index 58e9a37..b74f4fc 100644 (file)
--- a/views.py
+++ b/views.py
@@ -17,19 +17,35 @@ License along with this program; if not, write to the
 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 Boston, MA 02111-1307, USA.
 """
+<<<<<<< HEAD/views.py
 from django.shortcuts import render_to_response, get_object_or_404
 from django.template import RequestContext, Context
+=======
+from django.shortcuts import render_to_response, get_object_or_404
+from django.template import RequestContext, Context, loader
+>>>>>>> 11faa820abeb69b688db5076aa4c1cc663dfeb53/views.py
 from django.contrib.auth.decorators import login_required, user_passes_test
 from django.contrib.auth.models import Group, User
-from django.contrib.auth.forms import AuthenticationForm
-from django.contrib.auth import login
+from django.contrib.auth import authenticate, login
+from django.newforms import form_for_instance
+from django.core.mail import EmailMessage
 from django.db import transaction
+from django.http import get_host
+from django.conf import settings
 
 from eventmanager.decorators import enable_login_form
-from eventmanager.forms import *
 from eventmanager.conteudo.models import Noticia, Menu, Secao
 from eventmanager.eventos.models import *
+<<<<<<< HEAD/views.py
 from django.newforms import form_for_instance
+=======
+from eventmanager.forms import *
+
+from datetime import datetime
+import sha
+
+FROM_EMAIL = 'Emsl 2007 <noreply@minaslivre.org>'
+>>>>>>> 11faa820abeb69b688db5076aa4c1cc663dfeb53/views.py
 
 def build_response(request, template, extra={}):
     """
@@ -48,8 +64,10 @@ def build_response(request, template, extra={}):
     news = Noticia.objects.order_by('-data_criacao')
     menus = Menu.objects.all()
     index_sections = Secao.objects.filter(index=True)
+    login_failed = 'login_failed' in request.GET
     c = {'news': news, 'menu': menus,
-        'index_sections': index_sections}
+        'index_sections': index_sections,
+        'login_failed': login_failed}
     c.update(extra)
     return render_to_response(template, Context(c),
             context_instance=RequestContext(request))
@@ -65,76 +83,213 @@ def index(request):
 def cadastro_palestrante(request):
     form = CadastroPalestrante(request.POST or None)
     ok = False
+    c = {'form': form}
     if request.POST and form.is_valid():
         cd = form.cleaned_data
         badattr = form.errors
-        wrong = False
 
-        if not cd['telefone'] and not cd['celular']:
-            badattr['telefone_comercial'] = ['Algum número de telefone '
-                                             'precisa ser informado']
-            wrong = True
-
-        # don't save duplicated users...
+        group = Group.objects.get_or_create(name='palestrantes')[0]
+
+        user = User(username=cd['nome_usuario'], email=cd['email'])
+        user.set_password(cd['senha'])
+        user.is_active = False
+        user.save()
+        user.groups.add(group)
+
+        p = Palestrante()
+        p.usuario = user
+
+        p.nome = cd['nome_completo']
+        p.email = cd['email']
+        p.telefone = cd['telefone']
+        p.celular = cd['celular']
+        p.instituicao = cd['instituicao']
+        p.rua = cd['rua']
+        p.numero = cd['numero']
+        p.bairro = cd['bairro']
+        p.cidade = cd['cidade']
+        p.uf = cd['uf']
+        p.minicurriculo = cd['minicurriculo']
+        p.curriculo = cd['curriculo']
+        p.save()
+
+        for i in cd.get('area_interesse', []):
+            p.area_interesse.add(i)
+
+        pid = p.id
+        md5_email = sha.new(cd['email']).hexdigest()
+        email = '%s <%s>' % (cd['nome_completo'], cd['email'])
+        link = '%s/verificar?c=%s&c1=%s' % (get_host(request),
+                pid, md5_email)
+        t = loader.get_template('email-palestrante.html')
+        ec = Context(dict(fulano=['nome_usuario'], link=link))
+
+        # to be shown in template...
+        c.update({'email': email})
         try:
-            User.objects.get(username=cd['nome_usuario'])
-            badattr['nome_usuario'] = ['Este nome de usuário já existe!']
-            wrong = True
-            transaction.rollback()
-        except User.DoesNotExist:
-            pass
-
-        if cd['senha'] != cd['senha_2']:
-            badattr['senha_2'] = ['A senha não confere']
-            wrong = True
+            # XXX: maybe is not a good so prety put things hardcoded =(
+            m = EmailMessage('Encontro Mineiro de Software Livre',
+                t.render(ec), FROM_EMAIL, [email])
+            m.send()
+        except Exception:
+            badattr['email'] = \
+                ['Desculpe mas não pude enviar o email de confirmação']
             transaction.rollback()
-
-        if not wrong:
-            group = Group.objects.get_or_create(name='palestrantes')[0]
-
-            user = User(username=cd['nome_usuario'], email=cd['email'])
-            user.set_password(cd['senha'])
-            user.save()
-            user.groups.add(group)
-
-            p = Palestrante()
-            p.usuario = user
-
-            p.nome = cd['nome_completo']
-            p.email = cd['email']
-            p.telefone = cd['telefone']
-            p.celular = cd['celular']
-            p.instituicao = cd['instituicao']
-            p.rua = cd['rua']
-            p.numero = cd['numero']
-            p.bairro = cd['bairro']
-            p.cidade = cd['cidade']
-            p.uf = cd['uf']
-            p.minicurriculo = cd['minicurriculo']
-            p.curriculo = cd['curriculo']
-            p.save()
-
-            for i in cd.get('area_interesse', []):
-                p.area_interesse.add(i)
-
-            fakepost = request.POST.copy()
-            fakepost['username'] = cd['nome_usuario']
-            fakepost['password'] = cd['senha']
-
-            manipulator = AuthenticationForm(request)
-            errors = manipulator.get_validation_errors(fakepost)
-            got_user = manipulator.get_user()
-            login(request, got_user)
-            transaction.commit()
+        else:
             ok = True
-    c = {'form': form, 'ok': ok}
+            c.update({'ok': ok})
+            transaction.commit()
+
     return build_response(request, 'cadastro.html', c)
 
 
 @enable_login_form
 def inscricao(request):
+    return build_response(request, 'inscricao.html')
+
+
+@enable_login_form
+@transaction.commit_manually
+def inscricao_individual(request):
     form = Inscricao(request.POST or None)
-    return build_response(request, 'inscricao.html', {'form': form})
+    ok = False
+    if request.POST and form.is_valid():
+        cd = form.cleaned_data
+        group = Group.objects.get_or_create(name='participantes')[0]
+
+        user = User(username=cd['nome_usuario'], email=cd['email'])
+        user.set_password(cd['senha'])
+        user.is_active = False
+        user.save()
+        user.groups.add(group)
+        p = Participante()
+        p.usuario = user
+        p.nome = cd['nome_completo']
+        p.rg = cd['rg']
+        p.email = cd['email']
+        p.rua = cd['rua']
+        p.numero = cd['numero']
+        p.bairro = cd['bairro']
+        p.cidade = cd['cidade']
+        p.uf = cd['uf']
+        p.cep = cd['cep']
+        p.refbanco = 0
+        p.telefone = cd['telefone']
+        p.home_page = cd['home_page']
+        p.comercial = cd['inscricao_comercial']
+        p.cpf_cnpj = cd['cpf_cnpj']
+        p.save()
+
+        u = authenticate(username=cd['nome_usuario'], password=cd['senha'])
+        login(request, u)
+        transaction.commit()
+        ok = True
+
+    c = {'form': form, 'ok': ok}
+    return build_response(request, 'inscricao_individual.html', c)
+
+
+@enable_login_form
+@transaction.commit_manually
+def inscricao_caravana(request):
+    form = InscricaoCaravana(request.POST or None)
+    ok = False
+    if request.POST and form.is_valid():
+        cd = form.cleaned_data
+        group = Group.objects.get_or_create(name='participantes')[0]
+
+        user = User(username=cd['nome_usuario'], email=cd['email'])
+        user.set_password(cd['senha'])
+        user.is_active = False
+        user.save()
+        user.groups.add(group)
+
+        p = Participante()
+        p.usuario = user
+        p.nome = cd['nome_completo']
+        p.rg = cd['rg']
+        p.email = cd['email']
+        p.rua = cd['rua']
+        p.numero = cd['numero']
+        p.bairro = cd['bairro']
+        p.cidade = cd['cidade']
+        p.uf = cd['uf']
+        p.cep = cd['cep']
+        p.refbanco = 0
+        p.telefone = cd['telefone']
+        p.home_page = cd['home_page']
+        p.comercial = False # yeah, always false!
+        p.cpf_cnpj = ''
+        p.save()
+
+        c = Caravana()
+        c.coordenador = p
+        c.participantes = cd['lista_nomes']
+        c.save()
+
+        ok = True
+        u = authenticate(username=cd['nome_usuario'], password=cd['senha'])
+        login(request, u)
+        transaction.commit()
+
+    c = {'form': form, 'ok': ok}
+    return build_response(request, 'inscricao_caravana.html', c)
+
+
+@enable_login_form
+def inscricao_boleto(request):
+    # dynamic values of the form
+    now = datetime.now()
+    today = datetime.date(now)
+    first_date = datetime.date(datetime(2007, 10, 12))
+    c = {}
+
+    p = request.user.participante_set.get()
+    ca = p.caravana_set.all() and p.caravana_set.get()
+
+    initial = {}
+
+    if p.refbanco == 0:
+        # o número refTran deve ser gerado a cada novo boleto e deve ser único,
+        # mesmo para os testes
+        refs = [x.refbanco for x in Participante.objects.all()]
+        new_ref = len(refs)
+        while new_ref in refs or new_ref <= settings.MIN_REF_TRAN:
+            new_ref += 1
+
+        # este dado precisa ser persistente para que possa ser comparado logo acima
+        p.refbanco = new_ref
+        p.save()
+    else:
+        new_ref = p.refbanco
+
+    initial['refTran'] = '1458197%s' % str(new_ref).zfill(10)
+    if today < first_date:
+        initial['dtVenc'] = '12102007'
+        if not p.comercial:
+            initial['valor'] = '3500'
+        else:
+            initial['valor'] = '8000'
+
+        # caso seja uma caravana...
+        if ca and len(ca.parsed_participantes()) >= 10:
+            # sim, o valor aqui é 25 -- Desconto
+            initial['valor'] = '%s00' % (len(ca.parsed_participantes()) * 25)
+            c.update({'caravana': 1})
+    else:
+        initial['valor'] = '5000'
+        initial['dtVenc'] = '17102007'
+
+    initial['nome'] = p.nome
+    initial['endereco'] = '%s, %s - %s' % (p.rua, p.numero, p.bairro)
+    initial['cidade'] = p.cidade
+    initial['uf'] = p.uf
+    initial['cep'] = p.cep
+
+    form = Boleto(request.POST or None, initial=initial)
+    c.update({'form': form})
+    c.update(initial)
+    return build_response(request, 'inscricao_boleto.html', c)
 
 
 @login_required
@@ -152,7 +307,7 @@ def submeter_trabalho(request):
         t.descricao_curta = cd['descricao_curta']
         t.descricao_longa = cd['descricao_longa']
         t.recursos = cd['recursos']
-        t.evento = Evento.objects.get(pk=1) # let the hammer play arround!
+        t.evento = Evento.objects.get(pk=1) # XXX: let the hammer play arround!
         t.save()
 
         logged_in = request.user.palestrante_set.get()
@@ -179,6 +334,32 @@ def meus_trabalhos(request):
     c = {'trabalhos': t, 'palestrante': 1}
     return build_response(request, 'meus_trabalhos.html', c)
 
+<<<<<<< HEAD/views.py
+@login_required
+@user_passes_test(lambda u:u.palestrante_set.count() == 1, login_url='/')
+def editar_trabalho(request,codigo):
+    try:
+        p = Palestrante.objects.get(usuario=request.user)
+    except Palestrante.DoesNotExist:
+        # não palestrante...
+        c = {'palestrante': 0}
+        return build_response(request, 'meus_trabalhos.html', c)
+    trabalho = get_object_or_404(Trabalho, id=codigo,palestrante=p)
+    Formulario = form_for_instance(trabalho)
+    if request.method == 'POST':
+        form = Formulario(request.POST)
+        if form.is_valid():
+            form.save()
+            t = Trabalho.objects.filter(palestrante=p)
+            c = {'trabalhos': t, 'palestrante': 1}
+            c['editado_sucesso']=trabalho.titulo
+            return build_response(request, 'meus_trabalhos.html', c)
+    else:
+        form = Formulario()
+    
+    c = {'formulario':form}
+    return build_response(request, 'editar_trabalho.html', c)
+=======
 @login_required
 @user_passes_test(lambda u:u.palestrante_set.count() == 1, login_url='/')
 def editar_trabalho(request,codigo):
@@ -204,24 +385,52 @@ def editar_trabalho(request,codigo):
     c = {'formulario':form}
     return build_response(request, 'editar_trabalho.html', c)
 
+@login_required
+@user_passes_test(lambda u:u.palestrante_set.count() == 1, login_url='/')
+def editar_trabalho(request, codigo):
+    try:
+        p = Palestrante.objects.get(usuario=request.user)
+    except Palestrante.DoesNotExist:
+        # não palestrante...
+        c = {'palestrante': 0}
+        return build_response(request, 'meus_trabalhos.html', c)
+
+    trabalho = get_object_or_404(Trabalho, id=codigo, palestrante=p)
+    Formulario = form_for_instance(trabalho)
+
+    form = Formulario(request.POST or None)
+    if request.POST and form.is_valid():
+        form.save()
+        t = Trabalho.objects.filter(palestrante=p)
+        c = {'trabalhos': t, 'palestrante': 1}
+        c['editado_sucesso'] = trabalho.titulo
+        return build_response(request, 'meus_trabalhos.html', c)
+    
+    c = {'formulario': form}
+    return build_response(request, 'editar_trabalho.html', c)
+
+>>>>>>> 11faa820abeb69b688db5076aa4c1cc663dfeb53/views.py
+
 @login_required
 def meus_dados(request):
-    form = EditarPalestrante(request.POST or None)
-    palestrante = request.user.palestrante_set.get()
-    ok = False
+    try:
+        entity = request.user.palestrante_set.get()
+    except Palestrante.DoesNotExist:
+        entity = request.user.participante_set.get()
+
+    FormKlass = form_for_instance(entity)
 
-    for name, field in form.fields.items():
-        field.initial = getattr(palestrante, name)
+    # ugly hammer to hide some fields...
+    del FormKlass.base_fields['usuario']
 
+    ok = False
+    form = FormKlass(request.POST or None)
     if request.POST and form.is_valid():
-        cd = form.cleaned_data
-        for name, field in form.fields.items():
-            setattr(palestrante, name, cd[name])
-        palestrante.save()
+        form.save()
         ok = True
 
-    c = {'form': form, 'ok': ok}
-    return build_response(request, 'editar_palestrante.html', c)
+    c = {'form': form, 'ok': ok, 'title': entity.__class__.__name__}
+    return build_response(request, 'editar_usuario.html', c)
 
 
 @enable_login_form