urls.py:
from django.contrib import admin
from django.urls import path
from . import views
urlpatterns = [
path('admin/', admin.site.urls),
path('',views.index, name="index"),
path('navigation',views.navigationBar,name="navigationBar")
]
views.py:
from django.http import HttpResponse
from django.shortcuts import render
def navigationBar(request):
return render(request, 'navigationUrls.html')
templates/navigationUrls.html:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Personal Navigation</title>
</head>
<body>
<h1>Personal Navigations:<br/></h1>
<a href="https://soalicious.blogspot.com/" target="_blank">My Blog Page</a><br/>
<a href="https://www.facebook.com/" target="_blank">Facebook Login Page</a><br/>
<a href="https://twitter.com/?lang=en" target="_blank">Twitter Page</a><br/>
<a href="https://www.instagram.com" target="_blank">Instagram Page</a>
</body>
</html>
WebPage:
No comments:
Post a Comment