Commits

Ronny Pfannschmidt committed 00b5c5b

pyflakes based cleanups

Comments (0)

Files changed (2)

lodgeit/lib/captcha.py

     from PIL import ImageFont, ImageDraw, Image, ImageChops, ImageColor
 except ImportError:
     import ImageFont, ImageDraw, Image, ImageChops, ImageColor
-from werkzeug import Response
 
 try:
     from hashlib import sha1
 except ImportError:
     from sha import new as sha1
 
-from flask import request, session
+from flask import Response, session
+from lodgeit.application import app
 
 resource_path = abspath(join(dirname(__file__), pardir, 'res'))
 

lodgeit/models.py

 from random import random
 from werkzeug import cached_property
 
-from flask import request
+from flask import request, session
 from flask_sqlalchemy import SQLAlchemy
 
 from lodgeit.lib.highlighting import highlight, preview_highlight, LANGUAGES
         paste_list = db.session.query(Paste.paste_id).filter(db.and_(
             Paste.parent_id.in_(ids),
             Paste.handled == False,
-            Paste.user_hash != request.user_hash,
+            Paste.user_hash != session['user_hash'],
         )).order_by(Paste.paste_id.desc()).all()
 
         to_mark = [p.paste_id for p in paste_list]