ich die folgende Fehlermeldung erhaltenWie kann ich das beheben, wird folgende Fehler NoReverseMatch auf/blog/index/
NoReverseMatch at /blog/index/
und
Reverse for 'feed_articles' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
nur weil ich/gelöscht eine URL auf Kommentar ich weiß nicht mehr, brauchen. Die URL ist auch nicht blog/index. etwas sagt mir, dass es ein Bestellproblem ist, weil ich das vorher in meiner Django-App hatte. Aber ich bin verwirrt. Heres, was ich auskommentierte
Wie kann ich meine Syntax korrigieren, so dass dieses kleinere Problem funktioniert?
EDIT meiner Ansicht nach Blog/Index genannt wird
{% extends 'blog/base.html' %}
{% load staticfiles %}
<style>
{% block style %}
#hite{
min-height: 720px;
}
.post{
min-height: 157px;
max-height: 157px;
width: 100%;
}
.tall{
height: 300px;
}
{% endblock style %}
</style>
{% block content %}
<div id="hite">
<h1>worldstar</h1>
{% for d in divs %}
<div class="col-sm-6 col-md-4" style="margin-top: 30px">
<div class="thumbnail thumb tall">
<img src="{{d.src}}" alt="{{ d.text }}" class="img-responsive post">
<div class="caption">
<h5>{{ d.text }}</h5>
<p></p>
<p><a href="{{d.url}}{{ d.href }}" class="btn btn-primary" role="button">World *</a></p>
</div>
</div>
</div>
{% endfor %}
{% for a in articles %}
<div class="col-sm-6 col-md-4" style="margin-top: 30px" >
<div class="thumbnail thumb tall">
<div class="caption">
<h4 style="height: 100px">{{a.title}}</h4>
<p>{{a.description|truncatechars:30 | safe}}</p>
<h4>From: {{a.feed|truncatechars:30}}</h4>
<p>
<a href="{{a.url}}" target="_blank" class="btn btn-primary">View Article</a>
{% if user.is_authenticated %}
<a href="{% url 'blog:article_delete' a.id %}" class="btn btn-primary">delete</a>
{% endif %}
</p>
</div>
</div>
</div>
{% endfor %}
</div>
{% endblock %}
mein feed_articles
{% extends 'blog/base.html' %}
<style>
{% block style %}
/*ul{*/
/*list-style: none;*/
/*}*/
#hi{
min-height: 720px;
margin-top: 15px;
}
{% endblock style %}
</style>
{% block jumbotron %}
<h1>HArticles</h1>
<p> Have a look around at some of the latest news Here and abroad</p>
{% endblock jumbotron %}
{% block content %}
<div class="row" id="hi">
{% for a in articles %}
<div class="col-xs-12 col-sm-4 col-md-3 col-lg-6" >
<div class="thumbnail" style="height: 250px; padding-left: 10px">
<h4 style="height: 100px">{{a.title}}</h4>
<p>{{a.description|truncatechars:30 | safe}}</p>
<h4>From: {{a.feed|truncatechars:30}}</h4>
<p>
<a href="{{a.url}}" target="_blank" class="btn btn-primary">View Article</a>
{% if user.is_authenticated %}
<a href="{% url 'blog:article_delete' a.id %}" class="btn btn-primary">delete</a>
{% endif %}
</p>
</div>
</div>
{% endfor %}
</div>
{% endblock content %}
{% block aside %}
<h3 class="panel-body panel panel-default text-center"></h3>
{% endblock aside %}
Es wird Ihnen nicht sagen, dass die URL 'Blog/Index' ist, es sagt Ihnen, dass irgendwo in der Vorlage in der 'Blog/Index' eine URL auf 'feed_articles' zeigt –
@CurtisOlson das ist was ich dachte ursprünglich, also habe ich Befehl + f gedrückt, um meinen Code und nichts zu suchen, das dem – nothingness
entspricht Suchen Sie die Vorlage, die von der Ansicht gerendert wird, die aufgerufen wird, wenn '/ blog/index /' angefordert wird, und suchen Sie in dieser Vorlage nach '{ % url 'path_to_this_urls_file: feed_articles'%} ' –