Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flask-login does not work when using static_url_path #521

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

flask-login does not work when using static_url_path #521

maelp opened this issue Jun 6, 2012 · 4 comments

Comments

@maelp
Copy link

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
Copy link

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
Copy link

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
Copy link

Should this be closed?

@danielchatfield
Copy link

Yes it should

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants