Skip to content

Document new CMS settings #519

@timber-they

Description

@timber-they

With #440 new settings appeared:

# CMS contents
CMS_API_BASE_URL = ''
CMS_API_BASE_PATH = ''
CMS_API_KEY = ''

However, they are not documented in our README.md. If not configured properly, the API throws cryptic errors though:

api-1            | Internal Server Error: /cms/page/slug/
api-1            | Traceback (most recent call last):
api-1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
api-1            |     response = get_response(request)
api-1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
api-1            |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
api-1            |   File "/badgr_server/apps/mainsite/views.py", line 734, in cms_api_page_details
api-1            |     api_data["post_content"] = cms_transform_urls(api_data["post_content"])
api-1            | TypeError: string indices must be integers
api-1            | 2025-08-02 01:54:37,416 ERROR log Internal Server Error: /cms/page/slug/
api-1            | Traceback (most recent call last):
api-1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
api-1            |     response = get_response(request)
api-1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
api-1            |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
api-1            |   File "/badgr_server/apps/mainsite/views.py", line 734, in cms_api_page_details
api-1            |     api_data["post_content"] = cms_transform_urls(api_data["post_content"])
api-1            | TypeError: string indices must be integers
api-1            | [02/Aug/2025 01:54:37] "GET /cms/page/slug/?slug=startseite HTTP/1.1" 500 22320
api-1            | Internal Server Error: /cms/page/slug/
api-1            | Traceback (most recent call last):
api-1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
api-1            |     response = get_response(request)
api-1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
api-1            |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
api-1            |   File "/badgr_server/apps/mainsite/views.py", line 734, in cms_api_page_details
api-1            |     api_data["post_content"] = cms_transform_urls(api_data["post_content"])
api-1            | TypeError: string indices must be integers
api-1            | 2025-08-02 01:54:37,416 ERROR log Internal Server Error: /cms/page/slug/
api-1            | Traceback (most recent call last):
api-1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/exception.py", line 47, in inner
api-1            |     response = get_response(request)
api-1            |   File "/usr/local/lib/python3.8/site-packages/django/core/handlers/base.py", line 181, in _get_response
api-1            |     response = wrapped_callback(request, *callback_args, **callback_kwargs)
api-1            |   File "/badgr_server/apps/mainsite/views.py", line 734, in cms_api_page_details
api-1            |     api_data["post_content"] = cms_transform_urls(api_data["post_content"])
api-1            | TypeError: string indices must be integers

So I assume it's important to properly configure those parameters. Since they're not documented at all and the log messages are also not helpful, I don't know how to configure them though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No fields configured for Task.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions