Template
Populate the client website template with catalog feature flags.
Extract always-on public/portal/UTM plus optional email_sms, directmail, blog, payments, social, and social_ai so new client sites can be bootstrapped from this seed. Refs #1 Refs #2 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
from core.registry import register_dashboard_collector, register_feature, register_portal_nav
|
||||
|
||||
|
||||
def register() -> None:
|
||||
register_feature("payments")
|
||||
register_portal_nav(
|
||||
section="payments",
|
||||
label="Invoices",
|
||||
url_name="payments:invoice_list",
|
||||
group="Billing",
|
||||
order=10,
|
||||
)
|
||||
register_dashboard_collector(_dashboard)
|
||||
|
||||
|
||||
def _dashboard(request) -> dict:
|
||||
from payments.models import Invoice
|
||||
|
||||
open_count = Invoice.objects.exclude(
|
||||
status__in=[Invoice.Status.PAID, Invoice.Status.VOID]
|
||||
).count()
|
||||
return {"open_invoices": open_count}
|
||||
Reference in New Issue
Block a user