Commit b5dbf966 authored by KaoruSawade's avatar KaoruSawade

Edited urls to reflect requirements in the specs, edited base.html to properly...

Edited urls to reflect requirements in the specs, edited base.html to properly display a bottom navbar
parent 8588fbb3
from django.urls import path
from .views import index
from .views import home, books, authors
urlpatterns = [
path('', index, name='index'),
path('home/', home, name='home'),
path('books/', books, name='books'),
path('authors/', authors, name='authors'),
]
app_name = "bookshelf"
from django.shortcuts import render
from django.http import HttpResponse
def index(request):
return HttpResponse('test')
\ No newline at end of file
def home(request):
return render(request, 'bookshelf/home.html')
def books(request):
return render(request, 'bookshelf/books.html')
def authors(request):
return render(request, 'bookshelf/authors.html')
\ No newline at end of file
......@@ -17,6 +17,6 @@ from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('bookshelf/', include('bookshelf.urls', namespace="bookshelf")),
path('', include('bookshelf.urls', namespace="bookshelf")),
path('admin/', admin.site.urls),
]
<!DOCTYPE html>
<html lang="en">
<head>
<link rel="stylesheet" href="style.css">
<title>{% block title %}My amazing site{% endblock %}</title>
<style>
.navbarList{
list-style-type: none;
margin: 0;
padding: 0;
}
.navbarItem{
display: inline;
}
</style>
<title>{% block title %}{% endblock %}</title>
{% block styles %}{% endblock %}
</head>
<body>
<div id="content">
{% block content %}{% endblock %}
</div>
{% block scripts %}{% endblock %}
<hr>
<navbar>
{% block navbar %}{% endblock %}
</navbar>
</body>
</html>
\ No newline at end of file
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