diff options
Diffstat (limited to '')
-rw-r--r-- | ctrack/organisations/views.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/ctrack/organisations/views.py b/ctrack/organisations/views.py index 0902e57..74b290e 100644 --- a/ctrack/organisations/views.py +++ b/ctrack/organisations/views.py @@ -2,11 +2,18 @@ from typing import Any from typing import Dict from django.contrib.auth.mixins import LoginRequiredMixin -from django.views.generic import DetailView, ListView +from django.views.generic import DetailView, ListView, CreateView +from .forms import OrganisationCreateForm from .models import Organisation +class OrganisationCreate(LoginRequiredMixin, CreateView): + form_class = OrganisationCreateForm + model = Organisation + template_name = "organisations/organisation_create.html" + + class OrganisationListView(LoginRequiredMixin, ListView): model = Organisation |