flask-login does not work when using static_url_path #521

Closed
maelp opened this Issue Jun 6, 2012 · 4 comments

Projects

None yet

6 participants

@maelp
maelp commented Jun 6, 2012

For some reason
app = flask.Flask(__name__, static_folder='public', static_url_path='')
will cause flask-login to return AttributeError: 'RequestContext' object has no attribute 'user', and
app = flask.Flask(__name__, static_folder='public')
works

@jasonLaster

can you provide a minimal example?

from flask import Flask, url_for
app = Flask(__name__, static_folder='public', static_url_path='')
with app.test_request_context():
    url_for('static', filename='style.css')

outputs => '/style.css'

@baztian
baztian commented Feb 15, 2013

I'm having the same problem. It seems to be a flask-login specific issue though. I've created a flask-login bug report maxcountryman/flask-login#51

@gmschroeder

Should this be closed?

@danielchatfield

Yes it should

@jeffwidman jeffwidman closed this Apr 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment