Bugs and Integration Issues
Version 1 · Record the resolved missing QWebHub settings wiring for qdgwiki and module static paths
Historical versionBugs 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
- Run the QWebHub Django system check.
- Confirm
DATABASES["qdgwiki"]exists and selects theqdgwikischema. - Run
findstatic qdgkb_viewer/styles.cssand confirm the viewer stylesheet is found. - 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.