- 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
29 lines
1,003 B
Python
29 lines
1,003 B
Python
# Generated by Django 5.2.12 on 2026-08-07 14:17
|
|
|
|
from django.db import migrations, models
|
|
|
|
|
|
class Migration(migrations.Migration):
|
|
|
|
initial = True
|
|
|
|
dependencies = [
|
|
]
|
|
|
|
operations = [
|
|
migrations.CreateModel(
|
|
name='GuidePage',
|
|
fields=[
|
|
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
|
|
('path', models.CharField(max_length=255, unique=True)),
|
|
('title', models.CharField(max_length=255)),
|
|
('audience', models.CharField(choices=[('shared', 'Shared'), ('buyer', 'Buyer'), ('ops', 'Operations'), ('admin', 'Administrator')], max_length=20)),
|
|
('content', models.TextField(blank=True, default='')),
|
|
('updated_at', models.DateTimeField()),
|
|
('synced_at', models.DateTimeField(auto_now=True)),
|
|
],
|
|
options={
|
|
'ordering': ['path'],
|
|
},
|
|
),
|
|
]
|