[WebGrid] ModuleNotFoundError: No module named 'blazeweb'

Skip to first unread message

André Meneses

Mar 24, 2020, 5:53:01 AM3/24/20
to BlazeLibs

I'm trying to use the WebGrid for Flask/SQLAlchemy, and when trying to use it I get the following error:

ModuleNotFoundError: No module named 'blazeweb'

from the following statement:

from webgrid.blazeweb import Grid

Can someone please help me and point what I'm doing wrong?

Thank you

Matt Lewellyn

Mar 24, 2020, 8:13:45 AM3/24/20
to BlazeLibs
Webgrid has "plugins" for two frameworks, blazeweb and flask. To use it with a flask app, you'll need to use that plugin. Something like:

import webgrid
import webgrid.flask

class Grid(webgrid.BaseGrid):
    manager = webgrid.flask.WebGrid()
    # the following only if you want session persistence and search
    session_on = True
    enable_search = True

That should do it - then all of your grids can inherit from that Grid class.
Reply all
Reply to author
0 new messages