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
Copy file name to clipboardExpand all lines: docs/sites/index.md
+30-2Lines changed: 30 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
1
---
2
2
title: Custom sites
3
3
order: 11
4
-
description: Custom admin sites for Unfold.
4
+
description: Create and customize admin sites in Django Unfold, including overriding the default admin site and registering models with custom admin sites.
5
5
---
6
6
7
7
# Custom sites
@@ -10,6 +10,7 @@ In order to create a custom admin site, Unfold provides the `unfold.sites.Unfold
Note: If you use the default `django.contrib.admin.AdminSite` you will receive a `NoReverseMatch` error because the default admin site does not contain all URL patterns required by Unfold.
49
+
**Note**: If you use the default `django.contrib.admin.AdminSite` you will receive a `NoReverseMatch` error because the default admin site does not contain all URL patterns required by Unfold.
50
+
51
+
## Overriding the default admin site
52
+
53
+
If you want to override the default admin site by setting the `default_site` attribute of a custom `django.contrib.admin.apps.AdminConfig` class, you must install Unfold using `unfold.apps.AppConfig` instead of just `unfold` in `INSTALLED_APPS`.
54
+
55
+
```python
56
+
# settings.py
57
+
58
+
INSTALLED_APPS= [
59
+
"unfold.apps.BasicAppConfig", # App config not overriding `django.contrib.admin.site`
0 commit comments