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

Using Flask-MDE with in application factory leads to - AttributeError: 'NoneType' object has no attribute 'context_processor' #2

Closed
bittobennichan opened this issue Oct 30, 2019 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@bittobennichan
Copy link
Owner

Using Flask-MDE with in application factory leads to the following error

...
Original exception was:
Traceback (most recent call last):
  File "manage.py", line 2, in <module>
    from app import create_app, db
  File "/home/bitto/Desktop/serious_projects/ctrlv/app/__init__.py", line 9, in <module>
    mde = Mde()
  File "/usr/local/lib/python3.6/dist-packages/flask_mde/models.py", line 47, in __init__
    app.context_processor(self.context_processor)
AttributeError: 'NoneType' object has no attribute 'context_processor'

Steps to reproduce
Use Flask-MDE in application factory pattern like

from flask import Flask
from flask_mde import Mde
mde = Mde()


def create_app():
    app = Flask(__name__)
    mde.init_app(app)
    return app
@bittobennichan bittobennichan added the bug Something isn't working label Oct 30, 2019
@bittobennichan bittobennichan self-assigned this Oct 30, 2019
@bittobennichan
Copy link
Owner Author

I have already isolated the issue. Will be fixed in the next library update (1.1.2)

@bittobennichan bittobennichan pinned this issue Oct 30, 2019
@bittobennichan
Copy link
Owner Author

Fixed in v1.1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant