Commit e75e32fb authored by Hamid's avatar Hamid
Browse files

Le projet corriger avec la page A

parent 92e65bcb
Le serveur web de notre projet,consiste la partie executable sur le web .
Pour executer le projet il suffit de suivre les etapes suivantes :
-Installer la version 3 de python ,
-Se rendre sur le repertoire contenant votre code server
-Executer le code avec la commande :
python3 sever.python
-Installer flask avec la commande suivante :
pip3 install flask
-Telecharger le projet du depot :
avec la commande : git clone https://depot.lipn.univ-paris13.fr/david/lipn-search.git
-Verifier que votre port 8011 est bien libre
-Se rendre sur le repertoire server et lancer votre serveur :
python3 severweb.py
VOus remarquerez que le server a demarer avec un message sur votre terminal
-Consulter votre navigateur avec l'url
https://localhost:8080
https://localhost:8011
Et l'affichage de votre page html index serra afficher .
......
<!DOCTYPE html>
<html>
<head><title>Moteur de recherche</title></head>
<body>
<h1>Bienvenue dans notre serveur web fonctionel!!!!!</h1>
<h2>Il faut que ça soit trés jolie </h2>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>lipn search</title>
<!-- Bootstrap core CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<link href="https://fonts.googleapis.com/css?family=Lato:300,400,700,300italic,400italic,700italic" rel="stylesheet" type="text/css">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta3/dist/js/bootstrap.bundle.min.js" integrity="sha384-JEW9xMcG8R+pH31jmWH6WWP0WintQrMb4s7ZOdauHnUtxwoG2vI5DkLtS3qm9Ekf" crossorigin="anonymous"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<link rel="stylesheet" href="{{url_for('static',filename='../static/css/landing-page.min.css')}}">
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-light bg-light static-top">
<div class="container">
<a class="navbar-brand" href="#">Lipn Search</a>
</div>
</nav>
<!-- Masthead -->
<header class="masthead text-white text-center">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-xl-9 mx-auto">
<h1 class="mb-5">LIPN-SEARCH</h1>
</div>
<div class="col-md-10 col-lg-8 col-xl-7 mx-auto">
<form>
<div class="form-row">
<div class="col-12 col-md-25 mb-8 mb-md-0">
<input type="text" class="form-control form-control-lg" placeholder="Effectuez une recherche">
</div>
</div>
</form>
</div>
</div>
</div>
</header>
</body>
</html>
\ No newline at end of file
import http.server
import socketserver
PORT = 8080
Handler = http.server.SimpleHTTPRequestHandler
with socketserver.TCPServer(("", PORT), Handler) as http:
print("Serving at port", PORT)
http.serve_forever()
\ No newline at end of file
from flask import Flask, render_template
# Initialize the Flask application
app = Flask(__name__, template_folder='.')
@app.route('/')
def index():
return render_template('/index.html')
@app.route('/index')
def route_index():
return render_template('/index.html')
if __name__ == '__main__':
app.run(
host="localhost",
port=int("8011")
#,debug=True
)
body{font-family:Lato,'Helvetica Neue',Helvetica,Arial,sans-serif}h1,h2,h3,h4,h5,h6{font-family:Lato,'Helvetica Neue',Helvetica,Arial,sans-serif;font-weight:700}header.masthead{position:relative;background-color:#343a40;background:url(../img/bg-masthead.jpg) no-repeat center center;background-size:cover;padding-top:8rem;padding-bottom:8rem}header.masthead .overlay{position:relative;background-color:#212529;height:100%;width:100%;top:0;left:0;opacity:.3}header.masthead h1{font-size:2rem}@media (min-width:768px){header.masthead{padding-top:12rem;padding-bottom:12rem}header.masthead h1{font-size:3rem}}.showcase .showcase-text{padding:3rem}.showcase .showcase-img{min-height:30rem;background-size:cover}@media (min-width:768px){.showcase .showcase-text{padding:7rem}}.features-icons{padding-top:7rem;padding-bottom:7rem}.features-icons .features-icons-item{max-width:20rem}.features-icons .features-icons-item .features-icons-icon{height:7rem}.features-icons .features-icons-item .features-icons-icon i{font-size:4.5rem}.features-icons .features-icons-item:hover .features-icons-icon i{font-size:5rem}.testimonials{padding-top:7rem;padding-bottom:7rem}.testimonials .testimonial-item{max-width:18rem}.testimonials .testimonial-item img{max-width:12rem;box-shadow:0 5px 5px 0 #adb5bd}.call-to-action{position:relative;background-color:#343a40;background:url(../img/bg-masthead.jpg) no-repeat center center;background-size:cover;padding-top:7rem;padding-bottom:7rem}.call-to-action .overlay{position:absolute;background-color:#212529;height:100%;width:100%;top:0;left:0;opacity:.3}footer.footer{padding-top:4rem;padding-bottom:4rem}
\ 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