From 6fb942d462e4b69deb0b0a4f253394f3a364f0b3 Mon Sep 17 00:00:00 2001 From: Josh VanDeraa Date: Fri, 28 Jun 2024 07:32:12 -0500 Subject: [PATCH] Updates for activating docs link. --- changes/319.documentation | 1 + nautobot_chatops/__init__.py | 1 + nautobot_chatops/urls.py | 3 +++ 3 files changed, 5 insertions(+) create mode 100644 changes/319.documentation diff --git a/changes/319.documentation b/changes/319.documentation new file mode 100644 index 00000000..054c6579 --- /dev/null +++ b/changes/319.documentation @@ -0,0 +1 @@ +Updated app config settings to point to new url.py path for activating docs link. \ No newline at end of file diff --git a/nautobot_chatops/__init__.py b/nautobot_chatops/__init__.py index ab18bba1..efa39a7b 100644 --- a/nautobot_chatops/__init__.py +++ b/nautobot_chatops/__init__.py @@ -151,6 +151,7 @@ class NautobotChatOpsConfig(NautobotAppConfig): } caching_config = {} + docs_view_name = "plugins:nautobot_chatops:docs" def ready(self): """Function invoked after all apps have been loaded.""" diff --git a/nautobot_chatops/urls.py b/nautobot_chatops/urls.py index 8da8f0ac..53d9db14 100644 --- a/nautobot_chatops/urls.py +++ b/nautobot_chatops/urls.py @@ -2,6 +2,8 @@ import logging from django.urls import path +from django.templatetags.static import static +from django.views.generic import RedirectView from nautobot.apps.config import get_app_settings_or_config from nautobot.extras.views import ObjectChangeLogView, ObjectNotesView @@ -100,4 +102,5 @@ kwargs={"model": ChatOpsAccountLink}, ), *grafana_urlpatterns, + path("docs/", RedirectView.as_view(url=static("nautobot_chatops/docs/index.html")), name="docs"), ]