|
|
|
@ -114,6 +114,18 @@ class FormulaAdminSite(UnfoldAdminSite): |
|
|
|
form = super().get_form(request, obj, **kwargs) |
|
|
|
return form |
|
|
|
|
|
|
|
def each_context(self, request): |
|
|
|
"""Override to provide site-specific dropdown""" |
|
|
|
context = super().each_context(request) |
|
|
|
context["site_dropdown"] = [ |
|
|
|
{ |
|
|
|
"title": _("Imam Javad Site"), |
|
|
|
"link": "https://imamjavad.newhorizonco.uk/", |
|
|
|
"icon": "diamond", |
|
|
|
} |
|
|
|
] |
|
|
|
return context |
|
|
|
|
|
|
|
def get_urls(self): |
|
|
|
urls = super().get_urls() |
|
|
|
custom_urls = [ |
|
|
|
@ -198,6 +210,18 @@ class DovoodiAdminSite(UnfoldAdminSite): |
|
|
|
form = super().get_form(request, obj, **kwargs) |
|
|
|
return form |
|
|
|
|
|
|
|
def each_context(self, request): |
|
|
|
"""Override to provide site-specific dropdown""" |
|
|
|
context = super().each_context(request) |
|
|
|
context["site_dropdown"] = [ |
|
|
|
{ |
|
|
|
"title": _("Dovoodi Site"), |
|
|
|
"link": "https://dovodi.newhorizonco.uk/", |
|
|
|
"icon": "diamond", |
|
|
|
} |
|
|
|
] |
|
|
|
return context |
|
|
|
|
|
|
|
def get_urls(self): |
|
|
|
urls = super().get_urls() |
|
|
|
custom_urls = [ |
|
|
|
|