QDG Knowledge Base Read-only viewer QWebHub
bugs

Bugs and Integration Issues

Version 1 · Record the resolved missing QWebHub settings wiring for qdgwiki and module static paths

Historical version

Bugs and Integration Issues

Resolved: QDG KB Viewer helpers were defined but not consumed by QWebHub settings

Status: Resolved

Symptoms

QDG KB Viewer was correctly registered once in qwebhub/modules.py, but QWebHub failed when loading or serving the module because its database alias and module static directories were not active in Django settings.

Cause

The integration had correctly added qdgwiki_alias() and module_static_dirs() to qwebhub/config.py, matching the existing QWebHub configuration patterns. The final wiring step was missing: qwebhub/settings.py did not consume those helpers.

Defining configuration helpers alone does not change Django's runtime configuration.

Resolution

qwebhub/settings.py must include both integrations:

DATABASES = {
    "default": config.default_database(),
    "qdgwiki": config.qdgwiki_alias(),
}

STATICFILES_DIRS = [
    *config.module_static_dirs(enabled_django_modules()),
]

Preserve any existing static directories when merging the second setting. The exact default-database helper name may vary; the required invariant is that the qdgwiki alias calls config.qdgwiki_alias().

Verification

  1. Run the QWebHub Django system check.
  2. Confirm DATABASES["qdgwiki"] exists and selects the qdgwiki schema.
  3. Run findstatic qdgkb_viewer/styles.css and confirm the viewer stylesheet is found.
  4. Request /knowledge-base/ and a known KB page through QWebHub; both should return HTTP 200.

Durable integration rule

Register QDG KB Viewer through one module descriptor in modules.py. Keep database and static-path construction in config.py. Always complete the integration by plugging those helpers into DATABASES and STATICFILES_DIRS in settings.py; do not add special-case routing or static code elsewhere in the hub.

Updated by Robert via Codex on Aug. 1, 2026, 10:47 p.m. · Task: Remember the QDG KB Viewer QWebHub integration issue