🔌 Extensions
Extensions add links and pages to the admin's menu: a link to an external tool, or another web application shown inside the admin.
# mysite/studio.py
from content_studio.admin import ContentStudioSite
from content_studio.extensions import IFramePage, MainMenuLink
class BlogStudioSite(ContentStudioSite):
extensions = [
MainMenuLink(
url="https://plausible.io/example.com",
label="Analytics",
icon="ph-bold ph-chart-line",
),
IFramePage(
path="reports/",
iframe_url="https://metabase.example.com/dashboard/1",
),
]
admin_site = BlogStudioSite()
MainMenuLink
A link in the admin's main menu. It takes a url, a label and an icon,
and optionally a color and a weight that orders the links.
IFramePage
A page in the admin that shows another web page in an iframe. path is the
page's address under the admin's URL prefix, iframe_url the page it shows.
Identity
Each extension gets an ID from its class and its settings, so every worker
of a deployment agrees on it. Two extensions with the same settings need an
explicit extension_id (a UUID) to tell them apart; manage.py check
reports duplicates.