- New apps/guides app with GuidePage model and audience mapping by wiki path - sync_guides management command: one-way read-only sync from wikijs DB - Read-only wikijs_ro DB role + WIKI_DB_* env config (secrets, gitignored) - Markdown rendering with bleach sanitisation; rewrites internal guide links to the portal help root and wiki image paths to WIKI_PUBLIC_BASE - /portal/help/ (buyer) and /ops/help/ (ops) index + detail views with role-based audience filtering (404 on cross-role guides) - Help nav item added to both portal base templates - Tests: audience filtering, markdown sanitisation, link rewriting, sync command
11 lines
314 B
Python
11 lines
314 B
Python
from django.contrib import admin
|
|
|
|
from .models import GuidePage
|
|
|
|
|
|
@admin.register(GuidePage)
|
|
class GuidePageAdmin(admin.ModelAdmin):
|
|
list_display = ["path", "title", "audience", "updated_at", "synced_at"]
|
|
list_filter = ["audience"]
|
|
search_fields = ["path", "title"]
|
|
readonly_fields = ["synced_at"]
|