You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When models are registered, it registers them to the replaced site.
When reactpy_django is added to INSTALLED_APPS the site is replaced with the original.
Here is the chain of events.
Unfold replaces admin site
Models are registered on the Unfold site
reactpy_django runs and replaces the Unfold site with the original
The result is the original django site without any models registered.
I'm trying to figure out what could be casuing this, It doesnt appear reactpy_django touches the admin site.
NOTE: The unfold docs are clear that unfold MUST appear before django.contrib.admin in the INSTALLED_APPS.
Details
INSTALLED_APPS= [
"daphne",
"unfold", # before django.contrib.admin"unfold.contrib.filters", # optional, if special filters are needed"unfold.contrib.forms", # optional, if special form elements are needed"unfold.contrib.inlines", # optional, if special inlines are needed"django.contrib.admin",
"django.contrib.auth",
"django.contrib.contenttypes",
"django.contrib.sessions",
"django.contrib.messages",
"django.contrib.postgres",
"django.contrib.staticfiles",
"rest_framework",
"rest_framework.authtoken",
"django_extensions",
"corsheaders",
"drf_spectacular",
"djoser",
"constance",
"phonenumber_field",
# "cachalot","django_filters",
"django_guid",
"api",
"django_typer",
"reactpy_django",
# "scheduler", Added later in script if redis is found. See below.
]
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Unfold is a great Django app that provides a better admin interface.
It works by replacing the default admin site.
https://github.com/unfoldadmin/django-unfold/blob/c5a56323d35ff43b56ebdde1f9347ac26421dc89/src/unfold/apps.py#L1-L20
When models are registered, it registers them to the replaced site.
When
reactpy_django
is added toINSTALLED_APPS
the site is replaced with the original.Here is the chain of events.
reactpy_django
runs and replaces the Unfold site with the originalThe result is the original django site without any models registered.
I'm trying to figure out what could be casuing this, It doesnt appear
reactpy_django
touches the admin site.NOTE: The unfold docs are clear that
unfold
MUST appear beforedjango.contrib.admin
in theINSTALLED_APPS
.Details
Beta Was this translation helpful? Give feedback.
All reactions