I tried following this, but could not get it to work. I want to create a total custom site in admin (superuser login protected).
Here is what I tried:
admin.py:
class CampaignAdminSite(AdminSite):
def get_urls(self):
custom_urls = [re_path("campaigns/", self.admin_view(my_view)),]
urls = super().get_urls()
return custom_urls + urls
def my_view(request):
return render(request, 'admin_campaign.html'
I hoped for the extra link campaigns
to show up as an item in the admin first page - but I do not see anything, and I cannot go to the link by directly addressing it in the navbar. Do I need more?