Skip to content

Exercise 21. You must use an application context #11

Description

@kirillmasanov

In the Exercise 21: Applying Database Insertion, if you will use just a Python console in PyCharm you will catch an exception:
RuntimeError: No application found. Either work inside a view function or push an application context. See http://flask-sqlalchemy.pocoo.org/contexts/.

The easiest way to avoid this is to use not just the Python console, but flask shell . Just type in the PyCharm terminal - flask shell, it works in the application context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions