Skip to content

Commit a84e29b

Browse files
authored
deprecate rx Model (#6442)
* deprecate rx Model * respond to greptile
1 parent 702368e commit a84e29b

6 files changed

Lines changed: 286 additions & 192 deletions

File tree

reflex/app.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ def _setup_admin_dash(self):
10101010
from starlette_admin.contrib.sqla.admin import Admin
10111011
from starlette_admin.contrib.sqla.view import ModelView
10121012

1013-
from reflex.model import Model
1013+
from reflex.model import get_engine
10141014
except ImportError:
10151015
return
10161016

@@ -1023,7 +1023,7 @@ def _setup_admin_dash(self):
10231023
if admin_dash and admin_dash.models:
10241024
# Build the admin dashboard
10251025
admin = admin_dash.admin or Admin(
1026-
engine=Model.get_db_engine(),
1026+
engine=get_engine(),
10271027
title="Reflex Admin Dashboard",
10281028
logo_url="https://reflex.dev/Reflex.svg",
10291029
)

0 commit comments

Comments
 (0)