Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates app config and urls to populate docs link. #98

Merged
merged 2 commits into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/97.documentation
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Updated app config and urls.py for docs link.
1 change: 1 addition & 0 deletions nautobot_floor_plan/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ class FloorPlanConfig(NautobotAppConfig):
"default_y_axis_labels": AxisLabelsChoices.NUMBERS,
}
caching_config = {}
docs_view_name = "plugins:nautobot_floor_plan:docs"

def validate_config_options(self):
"""Validates app configuration options."""
Expand Down
3 changes: 3 additions & 0 deletions nautobot_floor_plan/urls.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
"""Django urlpatterns declaration for nautobot_floor_plan app."""

from django.urls import path
from django.templatetags.static import static
from django.views.generic import RedirectView

from nautobot.apps.urls import NautobotUIViewSetRouter
from nautobot.extras.views import ObjectChangeLogView, ObjectNotesView
Expand All @@ -26,5 +28,6 @@
kwargs={"model": models.FloorPlan},
),
path("locations/<uuid:pk>/floor_plan/", views.LocationFloorPlanTab.as_view(), name="location_floor_plan_tab"),
path("docs/", RedirectView.as_view(url=static("nautobot_floor_plan/docs/index.html")), name="docs"),
]
urlpatterns += router.urls