Suppression du blog par les post-it
This commit is contained in:
19
pywallter.py
19
pywallter.py
@@ -8,7 +8,7 @@ from flask_bcrypt import Bcrypt
|
||||
|
||||
|
||||
|
||||
from views.blog import blog
|
||||
from views.blog import postit
|
||||
from views.filesupload import filesupload
|
||||
from views.inscription import inscription
|
||||
from views.profil import profil
|
||||
@@ -46,7 +46,7 @@ extensionimg = {'.jpg', '.JPG', '.png', '.PNG', '.gif', '.GIF', '.bmp', '.BMP',
|
||||
##################################################################################################
|
||||
|
||||
app.register_blueprint(inscription)
|
||||
app.register_blueprint(blog)
|
||||
app.register_blueprint(postit)
|
||||
app.register_blueprint(filesupload)
|
||||
app.register_blueprint(profil)
|
||||
app.register_blueprint(logs)
|
||||
@@ -69,19 +69,6 @@ def parametres() :
|
||||
else:
|
||||
return redirect(url_for('loginlogout.login'))
|
||||
|
||||
@app.route('/up/view/<nom>')
|
||||
def download(nom):
|
||||
if 'username' in session :
|
||||
UTILISATEUR='%s' % escape(session['username'])
|
||||
nom = secure_filename(nom)
|
||||
if os.path.isfile(DOSSIER_PERSO + UTILISATEUR + '/files/' + nom): # si le fichier existe
|
||||
return send_file(DOSSIER_PERSO + UTILISATEUR + '/files/' + nom, as_attachment=True) # on l'envoie
|
||||
else:
|
||||
flash(u'Fichier {nom} inexistant.'.format(nom=nom), 'error')
|
||||
return redirect(url_for('list')) # sinon on redirige vers la liste, avec un message d'erreur
|
||||
else :
|
||||
return redirect(url_for('loginlogout.login'))
|
||||
|
||||
@app.route('/remove/<nom>')
|
||||
def remove(nom):
|
||||
if 'username' in session :
|
||||
@@ -134,7 +121,7 @@ def mythumbnails(filename):
|
||||
@app.route( '/' )
|
||||
def index():
|
||||
if 'username' in session :
|
||||
return redirect(url_for('filesupload.uploadfiles'))
|
||||
return redirect(url_for('profil.profile'))
|
||||
else :
|
||||
return redirect(url_for('loginlogout.login', _external=True))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user