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

register_module fails when url_prefix not previously set #29

Closed
flowblok opened this issue May 4, 2010 · 1 comment
Closed

register_module fails when url_prefix not previously set #29

flowblok opened this issue May 4, 2010 · 1 comment

Comments

@flowblok
Copy link

flowblok commented May 4, 2010

The following example (taken from the documentation, simplified) fails to work correctly.
The index() function is registered at / instead of /admin.

myapp/init.py:
from flask import Flask
from myapp.admin import admin
app = Flask(name)
app.register_module(admin, url_prefix='/admin')

myapp/admin.py
from flask import Module
admin = Module(name)
@admin.route('/')
def index():
return 'This should be at /admin'

@mitsuhiko
Copy link
Contributor

Fixed late binding of url_prefix. This closed by a921aef.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
This issue was closed.
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

2 participants