From b3ba5d7a9758a0e167409757dbe46dfc75bade5c Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Mon, 20 Jan 2020 20:15:03 +0000 Subject: convert our view to CBV --- ctrack/organisations/views.py | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'ctrack/organisations/views.py') diff --git a/ctrack/organisations/views.py b/ctrack/organisations/views.py index 30d00be..92bb134 100644 --- a/ctrack/organisations/views.py +++ b/ctrack/organisations/views.py @@ -1,2 +1,8 @@ -def organisations_detail_view(request): - pass +from django.contrib.auth.mixins import LoginRequiredMixin +from django.views.generic import DetailView + +from .models import Organisation + + +class OrganisationDetailView(LoginRequiredMixin, DetailView): + model = Organisation -- cgit v1.2.3