Skip to content

Commit 319e4fd

Browse files
authored
docs: sites urls example (#1315)
1 parent 9d3f643 commit 319e4fd

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/configuration/custom-sites.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,4 +71,15 @@ from django.contrib.admin.apps import AdminConfig
7171

7272
class MyAdminConfig(AdminConfig):
7373
default_site = "myproject.sites.CustomAdminSite"
74+
75+
def get_urls(self):
76+
urls = super().get_urls()
77+
urls += [
78+
path("my-custom-view/", self.admin_view(self.my_custom_view), name="my_custom_view"),
79+
]
80+
return urls
81+
82+
def my_custom_view(self, request, extra_context = None):
83+
# Your custom business logic
84+
pass
7485
```

0 commit comments

Comments
 (0)