Logs URL Patterns
URL configuration for the dashboard’s server logs, in the web console’s api.
It is mounted at /api/web/dashboard/logs/, from smarter.apps.dashboard.api.web.urls.
The log stream, at stream/, is read by the Prompt Passthrough’s Server Logs tab and by Smarter
Chat’s Console in the workbench. Registration is conditional on the
SMARTER_APP_DASHBOARD_SERVER_LOGS_ENABLE setting: when disabled, no routes are registered and an
informational log message is emitted. While the ENABLE_WEB_CONSOLE_SERVER_LOGS waffle switch is
off, the registered routes are a 404. See enabled.require_server_logs().
- smarter.apps.dashboard.views.terminal_emulator.urls.app_name
The Django application namespace, taken from
namespace.- Type:
- smarter.apps.dashboard.views.terminal_emulator.urls.urlpatterns
The list of URL patterns registered for this app. Empty when
smarter_settings.app_dashboard_server_logs_enableisFalse.- Type:
URL patterns (when enabled):
"stream/"—api.streams.stream_user_logs()(name:DashboardLogsApiReverseNames.stream)
These endpoints are part of Smarter’s Django-React integration. The Django view that renders a console page reverses their urls and passes them to the page’s React app, in the attributes of its root element, and the app calls them with the browser’s Django session and CSRF token. See Django-React Integration.