|
|
|
@ -51,21 +51,27 @@ def index(): |
|
|
|
|
|
|
|
|
|
|
|
@app.route('/home/') |
|
|
|
@app.route('/home/') |
|
|
|
def home(): |
|
|
|
def home(): |
|
|
|
|
|
|
|
pictoPath = os.listdir('./static/img/shape/') |
|
|
|
|
|
|
|
pictoR = random.choice(pictoPath) |
|
|
|
page = pages.get_or_404('home') |
|
|
|
page = pages.get_or_404('home') |
|
|
|
return render_template('home.html' , page=page ) |
|
|
|
return render_template('home.html' , page=page , picto=pictoR) |
|
|
|
|
|
|
|
|
|
|
|
@app.route('/<path:path>/') |
|
|
|
@app.route('/<path:path>/') |
|
|
|
def page_static(path): |
|
|
|
def page_static(path): |
|
|
|
|
|
|
|
pictoPath = os.listdir('./static/img/shape/') |
|
|
|
|
|
|
|
pictoR = random.choice(pictoPath) |
|
|
|
page = pages.get_or_404(path) |
|
|
|
page = pages.get_or_404(path) |
|
|
|
return render_template('page.html' , page=page ) |
|
|
|
return render_template('page.html' , page=page , picto=pictoR) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/vitrine/') |
|
|
|
@app.route('/vitrine/') |
|
|
|
def blog(): |
|
|
|
def blog(): |
|
|
|
|
|
|
|
pictoPath = os.listdir('./static/img/shape/') |
|
|
|
|
|
|
|
pictoR = random.choice(pictoPath) |
|
|
|
articles = (p for p in pages if 'date' in p.meta and 'category' in p.meta and p.meta['category']=='vitrine') |
|
|
|
articles = (p for p in pages if 'date' in p.meta and 'category' in p.meta and p.meta['category']=='vitrine') |
|
|
|
latest = sorted(articles, reverse=True,key=lambda p: p.meta['date']) |
|
|
|
latest = sorted(articles, reverse=True,key=lambda p: p.meta['date']) |
|
|
|
# catList = Liste_cat() |
|
|
|
# catList = Liste_cat() |
|
|
|
return render_template('flux_No_img.html', articles=latest ) |
|
|
|
return render_template('flux_No_img.html', articles=latest , picto=pictoR) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@app.route('/actu/') |
|
|
|
@app.route('/actu/') |
|
|
|
|