You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello! I'm trying to get my first endpoint with a template. But whatever I do doesn't work, I always get the TemplateDoesNotExist error. Can you help me with this?
Plugin Structure:
views.py
from django.shortcuts import render
from rest_framework.permissions import IsAuthenticated
from rest_framework.views import APIView
class ChooseActView(APIView):
permission_classes = [IsAuthenticated]
def get(self, request):
return render(request, 'netbox_datafort_plugin/choose_act.html', {})
urls.py
from django.urls import path
from . import views
urlpatterns = [
path('choose_act/', views.ChooseActView.as_view(), name='choose_act'),
]
Maybe I'm missing something? How should netbox find plugin templates?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
NetBox version
v3.2.4
Python version
3.8.10
Hello! I'm trying to get my first endpoint with a template. But whatever I do doesn't work, I always get the TemplateDoesNotExist error. Can you help me with this?

Plugin Structure:

views.py
urls.py
Maybe I'm missing something? How should netbox find plugin templates?
Beta Was this translation helpful? Give feedback.
All reactions