I've tried to explore other questions here about this but having trouble diagnosing my error--hoping someone here can help me out.
Here is the full error:
NoReverseMatch at /
Reverse for 'projects' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
Error during template rendering
In template /home/django/chrisblog/posts/templates/posts/home.html, error at line 0
The error happened when I tried to create a few additional pages on the website--just essentially copying the template of another page. These pages are using an extends tag with a 'base.html' template.
My URL file looks like this
from django.conf.urls import url
from django.contrib import admin
import posts.views
import sitepages.views
from django.conf.urls.static import static
from django.conf import settings
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'^$', posts.views.home, name="home"),
url(r'^resources/', sitepages.views.resources, name="resources"),
url(r'^projects/', sitepages.views.projects, name="projects"),
url(r'^about/', sitepages.views.about, name="about"),
url(r'^posts/(?P<post_id>[0-9]+)/$', posts.views.post_details, name="post_detail"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
and my Views file
from django.shortcuts import render
from . import models
def about(request):
return render(request,'sitepages/about.html')
def resources(request):
return render(request,'sitepages/resources.html')
def projects(request):
return render(request,'sitepages/projects.html')
Let me know if this is enough to go on. Thanks for the help.