I'm developing my own blog. Everything was good. I tried prepare it for deployment which was not successful. Now I undo all changes, but named url not working now (they were worked perfectly before): error:
Reverse for ''main_page'' with arguments '()' and keyword arguments '{}' not found
url:
urlpatterns = patterns('',
url(r'^$', main_page, name='main_page'),
url(r'^blog/', include('blog.blogurls')),
url(r'^comments/', include('django.contrib.comments.urls')),
)
main page view:
def main_page(request):
object_list = Article.objects.all()
return render_to_response('blog/main_page.html', {'Latest': object_list}
named url used in:
<p><a href="{% url 'main_page' %}">home</a></p>