modified: templates/blog.html
modified: templates/board.html modified: templates/profil.html modified: templates/up_up.html modified: views/blog.py modified: views/profil.py
This commit is contained in:
@@ -30,11 +30,11 @@ BASE_URL = app.config['BASE_URL']
|
||||
##################################################################################################
|
||||
|
||||
|
||||
@profil.route( '/profil/<img>', methods=['GET'] )
|
||||
def profil_img(img) :
|
||||
@profil.route( '/profil/<user>/<img>', methods=['GET'] )
|
||||
def profil_img(user, img) :
|
||||
if 'username' in session :
|
||||
UTILISATEUR='%s' % escape(session['username'])
|
||||
return send_from_directory( os.path.join(DOSSIER_PERSO, UTILISATEUR, 'profile'), img )
|
||||
|
||||
return send_from_directory( os.path.join(DOSSIER_PERSO, user, 'profile'), img )
|
||||
else:
|
||||
return redirect(BASE_URL, code=401)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user