does not load the template in django 1.11.8

0

Good morning to all, the end of this message is for you can help me find the error because I do not load a template removing the 404 error:

Page not found (404)
Request Method:     GET
Request URL:    http://127.0.0.1:8000/manager/panel/noticia/1/
Raised by:  manager.views.NoticiaUpdateView

No se encontró ningún noticia coincidente con la consulta

this is the admin_base template:

<li class="mm-dropdown">
                    <a href="#"><i class="menu-icon fa fa-check-square"></i><span class="mm-text">Noticias</span></a>
                    <ul>
                        <li class='{% if request.path == "/manager/panel/noticia/1/" %}active{% endif %}'>
                            <a tabindex="-1" href="{% url 'gestionar-noticia-actual' 1 %}"><span class="mm-text">Actualizar</span></a>
                        </li>

the extends:

{% extends 'admin_base.html' %}
{% block content %}
<div id="content-wrapper">
    <!-- 5. $CONTENT ===================================================================================-->
        <div class="panel">
            <div class="panel-heading">
                <span class="panel-title">GESTIONAR NOTICIA ACTUAL</span>
            </div>
            <div class="panel-body">
                <form action="" method="post" class="form-horizontal">{% csrf_token %}
                    {{ form.as_p }}
                    <input type="submit" value="Publicar" class="btn btn-success" />
                </form>
            </div>  
        </div>
</div> <!-- / #content-wrapper -->
{% endblock %}

the views:

> class NoticiaUpdateView(UpdateView):
>     template_name = "noticias/add.html"
>     form_class = NoticiaForm
>     model = Noticia
>     success_url = '/manager/panel/noticia/1/'

and the urls

from django.conf.urls import url
from .views import (
    LoginView, ObituarioAddView, ObituarioListView, 
    ObituarioUpdateView, ObituarioHistoricoListView,
    NoticiaUpdateView, EventoListView, EventoAddView, EventoUpdateView,
    EventoHistoricoListView, logout_view, procesarc_csv, 
)

urlpatterns = [
    url(r'^login/$', LoginView.as_view(), name='panel'),
    url(r'^logout/$', logout_view, name='logout'),
    url(r'^procesar_csv/$', procesarc_csv, name='procesar_csv'),
    url(r'^panel/obituarios/$', ObituarioListView.as_view(), name='gestionar-obituarios'),
    url(r'^panel/obituario/agregar/$', ObituarioAddView.as_view(), name='agregar-obituario'),
    url(r'^panel/obituario/(?P<pk>\d+)/$', ObituarioUpdateView.as_view(), name='editar-obituario'),
    url(r'^panel/obituarios/historico/$', ObituarioHistoricoListView.as_view(), name='gestionar-obituarios-historicos'),
    url(r'^panel/noticia/(?P<pk>\d+)/$', NoticiaUpdateView.as_view(), name='gestionar-noticia-actual'),
    url(r'^panel/eventos/$', EventoListView.as_view(), name='gestionar-eventos'),
    url(r'^panel/eventos/agregar/$', EventoAddView.as_view(), name='agregar-evento'),
    url(r'^panel/evento/(?P<pk>\d+)/$', EventoUpdateView.as_view(), name='editar-evento'),
    url(r'^panel/eventos/historico/$', EventoHistoricoListView.as_view(), name='gestionar-eventos-historicos'),
]

Thanks for the attention and collaboration

    
asked by hernan dario zapata villa 09.01.2018 в 20:06
source

0 answers