Commit 22db9d6c authored by Brendan Fausto's avatar Brendan Fausto

fixed naming error on template and typo in urls

parent eba77f89
......@@ -7,5 +7,8 @@
{% block content %}
Test blurb about books and their genres, as well as the authors behind the books here
<p>Test blurb about books and their genres, as well as the authors behind the books here</p>
<br>
<a href = "http://127.0.0.1:8000/bookshelf/books">Books</a>
<a href = "http://127.0.0.1:8000/bookshelf/authors">Authors</a>
{% endblock %}
\ No newline at end of file
......@@ -4,7 +4,7 @@ from django.urls import path
from .views import index, HomePageView
urlpatterns = [
path('home', HomePageView.as_view(), name='index'),
path('home', HomepageView, name='index'),
]
app_name = "bookshelf" # for proper namespacing in urls, otherwise will result in errors
\ No newline at end of file
......@@ -6,6 +6,9 @@ from django.views.generic.list import ListView
from .models import Books, Authors
class HomepageView(request):
return render(request, 'homepage.html', {'page_title': 'Books and Authors'})
return render(request, 'bookshelf/homepage.html', {
'page_title': 'Books and Authors'
})
# Create your views here.
......@@ -14,8 +14,9 @@ Including another URLconf
2. Add a URL to urlpatterns: path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path
from django.urls import include, path
urlpatterns = [
path('admin/', admin.site.urls),
path('bookshelf/', include('bookshelf.urls', namespace="bookshelf")),
]
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment