X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Feventmanager.git;a=blobdiff_plain;f=views.py;h=6b370ff2d2d914535bc30dccfaa39a804919da24;hp=3850ff9e5f64fb66dd8260111a06cf778734f8f2;hb=HEAD;hpb=c0015bbe2578350545541eab8433ef64e820bedb diff --git a/views.py b/views.py index 3850ff9..6b370ff 100644 --- a/views.py +++ b/views.py @@ -235,7 +235,7 @@ def inscricao_boleto(request): # dynamic values of the form now = datetime.now() today = datetime.date(now) - first_date = datetime.date(datetime(2007, 10, 12)) + first_date = datetime.date(datetime(2007, 10, 16)) c = {} p = request.user.participante_set.get() @@ -258,8 +258,8 @@ def inscricao_boleto(request): new_ref = p.refbanco initial['refTran'] = '1458197%s' % str(new_ref).zfill(10) - if today < first_date: - initial['dtVenc'] = '12102007' + if today <= first_date: + initial['dtVenc'] = '16102007' if not p.comercial: initial['valor'] = '3500' else: @@ -420,20 +420,18 @@ def dados_palestra(request, codigo): @enable_login_form def programacao(request): - try: - d = {'aprovadas': Trabalho.objects.filter(aprovado=True).order_by('dia','time_start')} - except ObjectDoesNotExist: - d = {} + ap = Trabalho.objects.filter(aprovado=True) + ord = ap.order_by('dia', 'time_start', 'room') + d = {'aprovadas': ord} return build_response(request, 'programacao.html',d) @enable_login_form @staff_member_required def grade(request): - try: - d = {'aprovadas': Trabalho.objects.filter(aprovado=True).order_by('dia', 'time_start')} - except ObjectDoesNotExist: - d = {} - return build_response(request, 'grade.html', d) + ap = Trabalho.objects.filter(aprovado=True) + ord = ap.order_by('dia', 'time_start', 'room') + d = {'aprovadas': ord} + return build_response(request, 'grade.html', d) @enable_login_form def chamada_trabalhos(request):