Browse Source

Cria template para documento e muda url de sucesso

pull/249/head
Eduardo Edson Batista Cordeiro Alves 9 years ago
parent
commit
ae346bd6df
  1. 3
      protocoloadm/views.py
  2. 7
      templates/protocoloadm/criar_documento.html

3
protocoloadm/views.py

@ -261,7 +261,8 @@ class CriarDocumentoProtocolo(CreateView):
return criar_documento(protocolo)
def get_success_url(self):
return reverse('detail_doc_adm', kwargs={'pk': self.object.pk})
return reverse('protocolo_mostrar', kwargs={'pk': self.kwargs['pk'],
'ano': self.kwargs['ano']})
class ProtocoloMostrarView(TemplateView):

7
templates/protocoloadm/criar_documento.html

@ -0,0 +1,7 @@
{% extends "crud/form.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block detail_content %}
{% crispy form %}
{% endblock %}
Loading…
Cancel
Save