Compare commits
3 Commits
8604831528
...
b781ebe8cf
Author | SHA1 | Date | |
---|---|---|---|
b781ebe8cf | |||
5a12cb23f2 | |||
4605928e7f |
1
.gitignore
vendored
1
.gitignore
vendored
@ -2,3 +2,4 @@ __pycache__/
|
|||||||
*.py[cod]
|
*.py[cod]
|
||||||
*$py.class
|
*$py.class
|
||||||
cache/
|
cache/
|
||||||
|
push_to_server.sh
|
11
app.py
11
app.py
@ -19,6 +19,7 @@ from flask import Flask
|
|||||||
from flask import render_template
|
from flask import render_template
|
||||||
from flask import url_for
|
from flask import url_for
|
||||||
from flask import request
|
from flask import request
|
||||||
|
from flask.helpers import make_response
|
||||||
|
|
||||||
# Fichiers locaux :
|
# Fichiers locaux :
|
||||||
import date_tools
|
import date_tools
|
||||||
@ -33,7 +34,8 @@ GLOBAL_CONTEXT = {} # Contexte constant pour les templates Jinja
|
|||||||
GLOBAL_CONTEXT["SOURCE"] = "https://forge.chapril.org/Wantoo/UniSquat_Python" # Le lien du code source
|
GLOBAL_CONTEXT["SOURCE"] = "https://forge.chapril.org/Wantoo/UniSquat_Python" # Le lien du code source
|
||||||
GLOBAL_CONTEXT["CREDITSLINK"] = "https://forge.chapril.org/Wantoo" # Le lien de l'organisation
|
GLOBAL_CONTEXT["CREDITSLINK"] = "https://forge.chapril.org/Wantoo" # Le lien de l'organisation
|
||||||
GLOBAL_CONTEXT["CREDITSNAME"] = "Wantoo" # Le nom de l'organisation
|
GLOBAL_CONTEXT["CREDITSNAME"] = "Wantoo" # Le nom de l'organisation
|
||||||
GLOBAL_CONTEXT["DEBUG"] = True # Fait en sorte que le logiciel soit un peu plus expressif
|
GLOBAL_CONTEXT["DEBUG"] = False # Fait en sorte que le logiciel soit un peu plus expressif
|
||||||
|
GLOBAL_CONTEXT["DOMAIN"] = "https://unisquat.alwaysdata.net" # Le domaine sur lequel est host l'instance
|
||||||
|
|
||||||
# Globales
|
# Globales
|
||||||
logs = [] # Stoque les différentes requêtes faite sur la route /free_rooms/, sous la forme {"timestamp":timestamp,"depts":[]}
|
logs = [] # Stoque les différentes requêtes faite sur la route /free_rooms/, sous la forme {"timestamp":timestamp,"depts":[]}
|
||||||
@ -310,6 +312,13 @@ def date_select() :
|
|||||||
|
|
||||||
return render_template("date-select.html", **context, **GLOBAL_CONTEXT)
|
return render_template("date-select.html", **context, **GLOBAL_CONTEXT)
|
||||||
|
|
||||||
|
@app.route("/sitemap.xml")
|
||||||
|
def sitemap():
|
||||||
|
sitemap_xml = render_template("sitemap.xml", **GLOBAL_CONTEXT)
|
||||||
|
response= make_response(sitemap_xml)
|
||||||
|
response.headers["Content-Type"] = "application/xml"
|
||||||
|
return response
|
||||||
|
|
||||||
|
|
||||||
@app.errorhandler(404)
|
@app.errorhandler(404)
|
||||||
def error(e):
|
def error(e):
|
||||||
|
7
items_to_push.txt
Normal file
7
items_to_push.txt
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
data
|
||||||
|
static
|
||||||
|
templates
|
||||||
|
app.py
|
||||||
|
date_tools.py
|
||||||
|
objects.py
|
||||||
|
rooms_get.py
|
18
templates/sitemap.xml
Normal file
18
templates/sitemap.xml
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>{{DOMAIN}}</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>1</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>{{DOMAIN}}/app</loc>
|
||||||
|
<changefreq>monthly</changefreq>
|
||||||
|
<priority>1</priority>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>{{DOMAIN}}/stats</loc>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
<priority>0.5</priority>
|
||||||
|
</url>
|
||||||
|
</urlset>
|
Loading…
Reference in New Issue
Block a user