From 37dc92b1127772467561f5b241e724ce0a1266e7 Mon Sep 17 00:00:00 2001 From: Gabriel Falcao Date: Tue, 11 Sep 2007 11:05:40 -0300 Subject: [PATCH] EN: Now people can change your own jobs PT: Agora os palestrantes podem modificar seus proprios trabalhos modified: eventos/models.py modified: forms.py modified: settings.py new file: templates/editar_trabalho.html modified: templates/meus_trabalhos.html modified: urls.py modified: views.py --- eventos/models.py | 4 ++-- forms.py | 1 - settings.py | 2 +- templates/editar_trabalho.html | 18 ++++++++++++++++++ templates/meus_trabalhos.html | 7 +++++++ urls.py | 1 + views.py | 28 ++++++++++++++++++++++++++-- 7 files changed, 55 insertions(+), 6 deletions(-) create mode 100644 templates/editar_trabalho.html diff --git a/eventos/models.py b/eventos/models.py index 3d51818..eda0771 100644 --- a/eventos/models.py +++ b/eventos/models.py @@ -41,9 +41,9 @@ class Evento(models.Model): class Admin: fields = ( - (None, {'fields': ('nome', 'data_inicio', 'data_final')}), + ('Informações do evento', {'fields': ('nome', 'data_inicio', 'data_final')}), ('Informações da sede', {'fields': ('nome_local', 'nome_contato', - 'cidade', 'uf', 'rua', 'numero', 'info_adicional')}), + 'cidade', 'uf', 'rua', 'numero','telefone', 'info_adicional')}), ) def __str__(self): diff --git a/forms.py b/forms.py index 7890fc6..8dc99df 100644 --- a/forms.py +++ b/forms.py @@ -52,7 +52,6 @@ class SubmeterTrabalho(forms.Form): 'ex.: Computadores, softwares, etc. Máximo de 300 caracteres.') outros_palestrantes = forms.MultipleChoiceField(required=0) - class CadastroPalestrante(forms.Form): nome_completo = forms.CharField(max_length=100) nome_usuario = forms.CharField(max_length=100) diff --git a/settings.py b/settings.py index 693a971..b52e14d 100644 --- a/settings.py +++ b/settings.py @@ -24,7 +24,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/Chicago' +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 diff --git a/templates/editar_trabalho.html b/templates/editar_trabalho.html new file mode 100644 index 0000000..38a4595 --- /dev/null +++ b/templates/editar_trabalho.html @@ -0,0 +1,18 @@ +{% extends "base.html" %} +{% block content %} + +

Editar trabalho

+ +{% if formulario %} +
+ {{ formulario.as_table }}
+ +
+ + + +{% else %} +

O trabalho selecionado não existe, verifique o link

+{% endif %} + +{% endblock %} diff --git a/templates/meus_trabalhos.html b/templates/meus_trabalhos.html index 84af9da..14bc58e 100644 --- a/templates/meus_trabalhos.html +++ b/templates/meus_trabalhos.html @@ -3,6 +3,13 @@

Trabalhos Inscritos

+{# o if abaixo eh para o caso de algum trabalho ter sido editado e redirecionado #} +{% if editado_sucesso %} +
+

O trabalho "{{ editado_sucesso}}" for editado com sucesso!

+
+{% endif %} + {% if trabalhos %}