I am learning to create a website using django. I have a homepage through which user can select city. The next page shows the list of hotels.It works properly,but when page is refreshed it gives me error
This is my html file for list page.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<!-- jQuery library -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<!-- Latest compiled JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
<script src="//code.jquery.com/jquery-1.10.2.min.js"></script>
<script src="//code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-backstretch/2.0.4/jquery.backstretch.min.js"></script>
<script type="text/javascript" src="../js/typeahead/0.11.1/typeahead.bundle.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery-easing/1.3/jquery.easing.min.js"></script>
{% load static %}
<script src="/static/typeahead.js "></script>
</head>
<body>
<div >
<div style="float:left; background-color:#d9d9d9;margin-top:100px;width:30%;height:800px;">
<h2 style="text-align:center;">Filters</h2>
<div style="width:95%; margin-left: 10px; " >
<form method="post" data-ajax="false" action="{% url 'list' %}">
{% csrf_token %}
<div data-role="rangeslider" data-mini="true" style="width:100%">
<label for="range-1a">price:</label>
<input name="range-1a" id="range-1a" min="0" max="100" value="0" type="range">
<label for="range-1b">Rangeslider:</label>
<input name="range-1b" id="range-1b" min="0" max="100" value="100" type="range">
</div>
<input type="submit" value="Submit">
</form>
</div>
</div>
<div style=" float:right;margin-right:30px;margin-top:100px;width:60%;height:80%">
{% for hotel in city_list %}
{% load static %}
<div class="col-md-4" style="width:45%;border:0;position:relative;">
<div class="thumbnail" style="height:300px; background-color:black;border:0;border-radius:0;position:relative;box-shadow:0;" >
<a href="/w3images/lights.jpg" data-ajax="false">
<img src="{% static hotel.photo.url %}" style="border:0;height:85%;width:100%;" >
<div class="caption">
<p style="color:white;">Name</p>
</div>
</a>
</div>
</div>
{% endfor %}
</div>
</div>
</body>
</html>
This is my views.py
def homepage(request):
hotel_list=Hotels.objects.all()
context={'hotel_list':hotel_list}
return render(request, 'polls/homepage.html',context)
def wholelist(request):
hotelvar=request.POST.get('service_type')
if hotelvar=='Hotels':
city_list=Hotels.objects.filter(city_name__iexact=request.POST.get('searchabc'))
if not city_list:
hotel_list=Hotels.objects.all()
context={'hotel_list':hotel_list}
return render(request, 'polls/homepage.html',context)
pricemin=200
pricemax=800
context={'pmin':pricemin,'pmax':pricemax,'city_list':city_list}
return render(request, 'polls/list.html',context)
i get the following error when refreshed
UnboundLocalError at /polls/wholelist/
local variable city_list referenced before assignment
city_list is being passed from the homepage, but when page is reloaded it not being passed. Is there a way to pass it when page is refreshed?
when hotelvar not equal to 'Hotels', variable city_list is not set
def wholelist(request):
hotelvar=request.POST.get('service_type')
city_list = None
if hotelvar=='Hotels':
city_list=Hotels.objects.filter(city_name__iexact=request.POST.get('searchabc'))
if not city_list:
hotel_list=Hotels.objects.all()
context={'hotel_list':hotel_list}
return render(request, 'polls/homepage.html',context)
pricemin=200
pricemax=800
context={'pmin':pricemin,'pmax':pricemax,'city_list':city_list}
return render(request, 'polls/list.html',context)
Related
got an error while doing the code.I want to redirect by button to other page but it is showing me the error I have not done any more coding just the simple code that we use to do I had written it nothing more
NoReverseMatch at /showing
Reverse for '<WSGIRequest: GET '/showing'>' not found. '<WSGIRequest: GET '/showing'>' is not a valid view function or pattern name.
my code of views.py
from django.shortcuts import redirect, render
from django.contrib.auth import authenticate,login
from user.forms import *
from django.contrib import messages
from user.models import *
from user.models import Orders
# Create your views here.
def home(request):
return render(request,'home.html')
def login(request):
if request.method=='POST':
username=request.POST['username']
password=request.POST['password']
userm=authenticate(user=username,passe=password)
if userm is not None:
login(request,userm)
messages.success(request,"You have login successfully...")
return redirect("home")
else:
messages.error(request,"Invalid Username or password...")
return redirect("login")
else:
return render(request,'base.html')
def register(request):
if request.method=='POST':
fm=Userregistration(request.POST)
if fm.is_valid():
fm.save()
else:
fm=Userregistration()
return render(request,'register.html',{'form':fm})
def Orderreg(request):
if request.method=='POST':
fm=Orderbook(request.POST)
if fm.is_valid():
pi=fm.cleaned_data['parcel_info']
pq=fm.cleaned_data['parcel_qty']
pw=fm.cleaned_data['parcel_weight']
um=fm.cleaned_data['unit_mass']
d=fm.cleaned_data['desti']
ord=Orders(parcel_info=pi,parcel_qty=pq,parcel_weight=pw,unit_mass=um,desti=d)
ord.save()
fm=Orderbook()
return redirect('service')
else:
fm=Orderbook()
u=Orders.objects.all()
return render(request,'service.html',{'form':fm,'us':u})
def contact(request):
return render(request,'contact.html')
def about(request):
return render(request,'about.html')
def show(request):
return redirect(request,'showing.html')
urls.py
from django.urls.conf import path
from user import views
urlpatterns = [
path('',views.home,name='home'),
path('home',views.home,name='home'),
path('login',views.login,name='login'),
path('register',views.register,name='register'),
path('about',views.about,name='about'),
path('service',views.Orderreg,name='service'),
path('contact',views.contact,name='contact'),
path('showing',views.show,name='show'),
]
my showing.html page is empty
code of service.html
{% extends 'base.html' %}
{% block body %}
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title></title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link href="https://cdn.jsdelivr.net/npm/bootstrap#5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<link rel="stylesheet" href="{% static 'css/bootstrap.css' %}">
</head>
<body>
<form action="" method="POST">
{% csrf_token %}
<section class="" style="background-color: #b6977d;">
<div class="container h-200">
<div class="row d-flex justify-content-center align-items-center h-100">
<div class="col-lg-12 col-xl-11">
<div class="card text-black my-5" style="border-radius: 35px;">
<div class="card-body p-md-5">
<div class="row justify-content-center">
<div class="col-md-10 col-lg-6 col-xl-5 order-2 order-lg-1">
<p class="text-center h1 fw-bold mb-5 mx-1 mx-md-4 mt-4">Place order</p>
{{form.as_p}}
<input type="submit" class="btn btn-success btn-block" value="Order">
Show my Order
</div>
<div class="col-md-10 col-lg-6 col-xl-7 d-flex align-items-center order-1 order-lg-2">
<img src="/static/user-registration-removebg-preview.png" class="img-fluid" alt="Sample image">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<script src="{% static 'js/jquery.js' %}"></script>
<script src="{% static 'js/poper.js' %}"></script>
<script src="{% static 'js/bootstrap.js' %}"></script>
</body>
</html>
{% endblock body %}
When I was adding a template from the internet to my login.html code I encountered a problem. When I try to login it did not work. Even after I added CSRF tokens and login form control code. It has a clickable button that does not thing. I hope someone can help me. If any pictures or other codes needed please feel free to ask.
inn.html(login.html 1'this is a nickname'))
{% extends 'base.html' %}
{% block title %}Login{% endblock %}
{% block content %}
<div class="container">
<br/>
<h1>Login</h1>
<br/> <br/>
<div class="form-group">
<form method="POST">
{% csrf_token %}
{{ form.as_p }}
<button class="btn btn-secondary">Login</button>
</div>
{% endblock %}
login.html:
{% extends 'base.html' %}
{% load static %}
{% block content %}
<!doctype html>
<html lang="en">
<head>
<!-- Required meta tags -->
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="https://fonts.googleapis.com/css?family=Roboto:300,400&display=swap" rel="stylesheet">
<link rel="stylesheet" href="{% static 'fonts/icomoon/style.css' %}">
<link rel="stylesheet" href="{% static 'css/owl.carousel.min.css' %}">
<!-- Bootstrap CSS -->
<link rel="stylesheet" href="{% static 'css/bootstrap.min.css' %}">
<!-- Style -->
<link rel="stylesheet" href="{% static 'css/style.css' %}">
</head>
<body>
<div class="content">
<div class="container">
<div class="row">
<div class="col-md-6 order-md-2">
<img src="{% static 'images/undraw_file_sync_ot38.svg' %}" alt="Image" class="img-fluid">
</div>
<div class="col-md-6 contents">
<div class="row justify-content-center">
<div class="col-md-8">
<div class="mb-4">
<h3>Sign In to <strong>C</strong></h3>
<p class="mb-4">Lorem.</p>
</div>
<form method="POST">
{% csrf_token %}
<div class="form-group">
<input type="text" class="form-control" id="username" placeholder="Username">
</div>
<div class="form-group">
<input type="password" class="form-control" id="password" for="password" placeholder="Password">
</div>
<input type="submit" value="Log In" class="btn text-white btn-block btn-primary">
</form>
</div>
</div>
</div>
</div>
</div>
</div>
<script src="{% static 'js/jquery-3.3.1.min.js' %}"></script>
<script src="{% static 'js/popper.min.js' %}"></script>
<script src="{% static 'js/bootstrap.min.js' %}"></script>
<script src="{% static 'js/main.js' %}"></script>
</body>
</html>
{% endblock %}
The following is my code, when I tried it I get an error:
'accounts/register' could not be found
index.html:
{% load static %}
{% static "images" as baseUrl %}
<!doctype html>
<!-- Website Template by freewebsitetemplates.com -->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mustache Enthusiast</title>
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/mobile.css' %}" media="screen and (max-width : 568px)">
<script type="text/javascript" src="{% static 'js/mobile.js' %}"></script>
</head>
<body>
<div id="header">
<a href="{% static 'index.html' %}" class="logo">
<img src="{% static 'images/logo.jpg' %}" alt="">
</a>
<ul id="navigation">
<li class="selected">
home
</li>
<li>
about
</li>
<li>
register
</li>
<li>
contact
</li>
</ul>
</div>
<div id="body">
<div id="featured">
<img src="{% static 'images/the-beacon.jpg' %}" alt="">
<div>
<h2>the beacon to all mankind</h2>
<span>Our website templates are created with</span>
<span>inspiration, checked for quality and originality</span>
<span>and meticulously sliced and coded.</span>
read more
</div>
</div>
<ul>
{% for cate in categos %}
<li>
<a href="{% static 'gallery.html' %}">
<img src="{{cate.img.url}}" alt="" style="width:240px;height:200px;">
<span>{{cate.name}}</span>
</a>
</li>
{% endfor %}
</ul>
</div>
</body>
</html>
register.html :
{% load static%}
<!doctype html>
<!-- Website Template by freewebsitetemplates.com -->
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Mustache Enthusiast</title>
<link rel="stylesheet" type="text/css" href="{% static 'css/style.css' %}">
<link rel="stylesheet" type="text/css" href="{% static 'css/mobile.css' %}" media="screen and (max-width : 568px)">
<script type="text/javascript" src="{% static 'js/mobile.js' %}"></script>
</head>
<body>
<div id="header">
<a href="{% static 'index.html' %}" class="logo">
<img src="{% static 'images/logo.jpg' %}" alt="">
</a>
<ul id="navigation">
<li class="selected">
home
</li>
<li>
about
</li>
<li>
contact
</li>
</ul>
</div>
<div id="body">
<div id="featured">
<img src="{% static 'images/the-beacon.jpg' %}" alt="">
<div>
<h2>Registration</h2>
<form action="register" method="POST">
{% csrf_token %}
<input type="text" name="first_name" placeholder="First name"><br>
<input type="text" name="last_name" placeholder="Last name"><br>
<input type="text" name="username" placeholder="Username"><br>
<input type="email" name="email" placeholder="email"><br>
<input type="password" name="password1" placeholder="Password"><br>
<input type="password" name="password2" placeholder="Confirm password"><br>
<input type="submit">
</form>
read more
</div>
</div>
</div>
</body>
</html>
views.py in accounts app:
from django.shortcuts import render
# Create your views here.
def register(request):
return render(request,'register.html',)
urls.py in accounts app :
from django.urls import path
from . import views
urlpatterns = [
path('register', views.register, name='register')
]
models.py in propython :
from django.db import models
# Create your models here.
class categories(models.Model):
name = models.CharField(max_length=100)
img = models.ImageField(upload_to='pics')
views.py in propython
from django.shortcuts import render
from .models import categories
# Create your views here.
def index(request):
categos = categories.objects.all()
return render(request,'index.html', {'categos': categos})
But I change chrome browser URL http://127.0.0.1:8000/static/accounts/register to
http://127.0.0.1:8000/accounts/register then my code run without any problem.
I'm guessing that the error is in your register.html, where you are initializing your form:
<form action="register" method="POST">
the action attribute accepts a url not a string, change it to this:
<form action="{% url 'register' %}" method="POST">
or add a slash before register:
<form action="/register" method="POST">
Of course there is no path http://127.0.0.1:8000/static/accounts/register.
so when you change http://127.0.0.1:8000/static/accounts/register to http://127.0.0.1:8000/accounts/register, it should work properly. that's obvious. unless the path in your urls.py project be static/accounts/.
The way you generate URLs in the template seems off.
The static tag is used to include static assets (images, CSS, JavaScript) in your code:
{% static "some_app/some_file.css" %}
The url tag is used to generate an URL, basing on your Django application URL configuration:
{% url "app_prefix:name" %}
when I try to login to the page, it is not moving onto the next page. The project is linked to a db and the db stores the superuser data, but the login is not moving further
login_page.html :
{% load static %}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Student Management System | Log in</title>
<!-- Tell the browser to be responsive to screen width -->
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- Font Awesome -->
<link rel="stylesheet" href="{% static "plugins/fontawesome-free/css/all.min.css" %}">
<!-- Ionicons -->
<link rel="stylesheet" href="https://code.ionicframework.com/ionicons/2.0.1/css/ionicons.min.css">
<!-- icheck bootstrap -->
<link rel="stylesheet" href="{% static "plugins/icheck-bootstrap/icheck-bootstrap.min.css" %}">
<!-- Theme style -->
<link rel="stylesheet" href="{% static "dist/css/adminlte.min.css" %}">
<!-- Google Font: Source Sans Pro -->
<link href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:300,400,400i,700" rel="stylesheet">
</head>
<body class="hold-transition login-page">
<div class="login-box">
<div class="login-logo">
<b>Student</b> Management System
</div>
<!-- /.login-logo -->
<div class="card">
<div class="card-body login-card-body">
<p class="login-box-msg">Sign in to Student Management System</p>
<form action="/doLogin" method="post">
{% csrf_token %}
<div class="input-group mb-3">
<input type="email" class="form-control" placeholder="Email" name="email">
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-envelope"></span>
</div>
</div>
</div>
<div class="input-group mb-3">
<input type="password" class="form-control" placeholder="Password" name="password">
<div class="input-group-append">
<div class="input-group-text">
<span class="fas fa-lock"></span>
</div>
</div>
</div>
<div class="row">
<!-- /.col -->
<div class="col-12">
<button type="submit" class="btn btn-primary btn-block">Sign In</button>
</div><!-- /.col -->
</div>
</form>
<!-- /.social-auth-links -->
</div>
<!-- /.login-card-body -->
</div>
</div>
<!-- /.login-box -->
<!-- jQuery -->
<script src="{% static "plugins/jquery/jquery.min.js" %}"></script>
<!-- Bootstrap 4 -->
<script src="{% static "plugins/bootstrap/js/bootstrap.bundle.min.js" %}"></script>
<!-- AdminLTE App -->
<script src="{% static "dist/js/adminlte.min.js" %}"></script>
</body>
</html>
urls.py :
from django.conf.urls import url
from django.contrib import admin
from django.conf.urls.static import static
from student_management_app import views
from student_management_system import settings
urlpatterns = [
url('demo',views.showDemoPage),
url(r'^admin/', admin.site.urls),
url('',views.ShowLoginPage),
url('doLogin',views.doLogin),
]+static(settings.MEDIA_URL,document_root=settings.MEDIA_ROOT)+static(settings.STATIC_URL,document_root=settings.STATIC_ROOT)
The doLogin function is supposed to output the login credentials entered in the login page, but it is not going to the output part of it
views.py :
import datetime
from django.http import HttpResponse, HttpResponseRedirect
from django.shortcuts import render
def showDemoPage(request):
return render(request,"demo.html")
def ShowLoginPage(request):
return render(request,"login_page.html")
def doLogin(request):
if request.method != "POST":
return HttpResponse("<h2>Method not Allowed</h2>")
else:
return HttpResponse("Email : "+request.POST.get("email")+" Password : "+request.POST.get("password"))
one thing you can try to do is put a Login redirect URL in the settings.py file.
LOGIN_REDIRECT_URL = '/'
When running the webapp a 404 error appears, the error doesnt even allow my error html to run even when changing it to the most basic of templates. I dont know where my request is being not found.
Ive tried removing all of the style sheets from base.html to see if its those, I tried changing the error.html to see if it will actually run I've attempted to comment out all url_for's in the html files.
I commented out the results bit so i dont think its that.
routes.py
from app import app
from flask import Flask, abort, jsonify, redirect, url_for, request, render_template
from werkzeug.exceptions import HTTPException
from app.results import clean_data, get_response
#app.errorhandler(Exception)
def handle_error(e):
'''
code = 500
if isinstance(e, HTTPException):
code = e.code'''
print(str(e))
return render_template("error.html")
#app.route('/', methods=['GET', 'POST'])
def index():
data = clean_data(request.form)
response = get_response(data)
print(response)
return render_template("index.html")
base.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Default Scorer -- Ebury</title>
<meta name = "viewport" content = "width=device-width", initial-scale = 1, shrink-to-fit=no">
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
<!-- CSS-->
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link href="https://fonts.googleapis.com/css?family=Roboto:100" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- JS-->
<!-- [if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif] -->
<script src="https://ebury-chameleon.s3.amazonaws.com/1.17.0/scripts/ebury-chameleon.js" type="text/javascript"></script>
</head>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="/">
<img src="{{ url_for('static', filename='img/Ebury.png') }}" width="80" height="30" alt="">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link active" href="/"><b>Default Scorer</b> <span class="sr-only">(current)</span></a>
</div>
<div class="navbar-nav ml-auto">
<a class="nav-item nav-link" href="/logout">Log out</a>
</div>
</div>
</nav>
<body>
</body>
</html>
index.html(only relevant parts its got a lot of forms)
{% extends "base.html" %}
{% block title %}Index{% endblock %}
{% block content %}
<div class="m-1 pb-3"></div>
<div class="container-fluid">
<div class = "row">
<div class="col-md-3 push-md-3">
<div class = "m-0 pb-0">
<form action="" method="post" role="form" class="needs-validation" novalidate>
<div class="container">
<div class = "form-group">
<div class = "row">
<div class="input-group input-group-sm mb-3">
<div class="input-group-prepend">
<span class = "input-group-text">BVD ID Number</span>
</div>
<input type = "text" class = "form-control" id = "bvd_id_number" name = "bvd_id_number">
</div>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
</div>
{% endblock %}
{% block scripts %}
<script>
(function() {
'use strict';
window.addEventListener('load', function() {
// Fetch all the forms we want to apply custom Bootstrap validation styles to
var forms = document.getElementsByClassName('needs-validation');
// Loop over them and prevent submission
var validation = Array.prototype.filter.call(forms, function(form) {
form.addEventListener('submit', function(event) {
if (form.checkValidity() === false) {
event.preventDefault();
event.stopPropagation();
}
form.classList.add('was-validated');
}, false);
});
}, false);
})();
</script>
{% endblock %}
error.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>ERROR</title>
</head>
<body>
<h1>ERROR</h1>
</body>
</html>
So what happens is that the form doesnt appear and it seems only base.html appears with nothing else, the icon doesnt appear either but I tried commenting that out and that doesnt work.
The error printed is "404 Not Found: The requested URL was not found on the server. IF you entered the URL manually please check your spelling and try again"
To future people: I solved because the base.html did not specify where it had to be extended. The correct base.html code would be:
<html>
<head>
<meta charset="utf-8">
<title>Default Scorer -- Ebury</title>
<meta name = "viewport" content = "width=device-width", initial-scale = 1, shrink-to-fit=no">
<link rel="icon" href="{{ url_for('static', filename='favicon.ico') }}">
<!-- CSS-->
<link rel="stylesheet" href="{{ url_for('static', filename='css/style.css') }}">
<link href="https://fonts.googleapis.com/css?family=Roboto:100" rel="stylesheet">
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.2.1/css/bootstrap.min.css" integrity="sha384-GJzZqFGwb1QTTN6wy59ffF1BuGJpLSa9DkKMp0DgiMDm4iYMj70gZWKYbI706tWS" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<!-- JS-->
<!-- [if lt IE 9]><script src="https://cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv.min.js" type="text/javascript"></script><![endif] -->
<script src="https://ebury-chameleon.s3.amazonaws.com/1.17.0/scripts/ebury-chameleon.js" type="text/javascript"></script>
</head>
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<a class="navbar-brand" href="/">
<img src="{{ url_for('static', filename='img/Ebury.png') }}" width="80" height="30" alt="">
</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNavAltMarkup" aria-controls="navbarNavAltMarkup" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarNavAltMarkup">
<div class="navbar-nav">
<a class="nav-item nav-link active" href="/"><b>Default Scorer</b> <span class="sr-only">(current)</span></a>
</div>
<div class="navbar-nav ml-auto">
<a class="nav-item nav-link" href="/logout">Log out</a>
</div>
</div>
</nav>
<body>
{% block content %}
{% endblock %}
</body>
{% block scripts %}
{% endblock %}
</html>```