Fix bugs in section files
This commit is contained in:
@@ -7,7 +7,7 @@ from PIL import Image
|
||||
import time
|
||||
import sqlite3
|
||||
import os
|
||||
|
||||
from tools.filesutils import check_and_create
|
||||
|
||||
mygallery = Blueprint('mygallery', __name__, template_folder='templates')
|
||||
|
||||
@@ -18,7 +18,7 @@ app.config.from_pyfile('config.py')
|
||||
#### Variables ####################################################################################
|
||||
|
||||
DOSSIER_PERSO= app.config['DOSSIER_APP']
|
||||
|
||||
DOSSIER_PUBLIC= app.config['DOSSIER_PUBLIC']+'/'
|
||||
extensionimg = app.config['EXT_IMG']
|
||||
|
||||
DATABASE = app.config['DATABASE']
|
||||
@@ -27,8 +27,12 @@ DATABASE = app.config['DATABASE']
|
||||
@mygallery.route( '/gallery/')
|
||||
def gallery():
|
||||
if 'username' in session :
|
||||
UTILISATEUR='%s' % escape(session['username'])
|
||||
THUMBNAILS=DOSSIER_PERSO + UTILISATEUR + '/images/thumbnails/'
|
||||
user ='%s' % escape(session['username'])
|
||||
check_and_create(DOSSIER_PUBLIC + user + '/images/')
|
||||
check_and_create(DOSSIER_PUBLIC + user + '/images/thumbnails/')
|
||||
check_and_create(DOSSIER_PERSO + user + '/images/')
|
||||
check_and_create(DOSSIER_PERSO + user + '/images/thumbnails/')
|
||||
THUMBNAILS=DOSSIER_PERSO + user + '/images/thumbnails/'
|
||||
fichiers = [fich for fich in os.listdir(THUMBNAILS)]
|
||||
return render_template('gallery.html',
|
||||
section='Gallery',
|
||||
|
||||
Reference in New Issue
Block a user