Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
pass
class View(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoView):
pass
class ListView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoListView):
pass
class DetailView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDetailView):
pass
class DeleteView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDeleteView):
pass
class CreateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoCreateView):
pass
class UpdateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoUpdateView):
pass
class FormView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoFormView):
pass
class EditView(CreateView):
FormView as DjangoFormView,
)
from djutils.views.generic import TitleMixin
from core.generic import mixins
class TemplateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoTemplateView):
pass
class View(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoView):
pass
class ListView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoListView):
pass
class DetailView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDetailView):
pass
class DeleteView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDeleteView):
pass
class CreateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoCreateView):
pass
class UpdateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoUpdateView):
pass
class ListView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoListView):
pass
class DetailView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDetailView):
pass
class DeleteView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDeleteView):
pass
class CreateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoCreateView):
pass
class UpdateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoUpdateView):
pass
class FormView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoFormView):
pass
class EditView(CreateView):
object = None
title_create = ''
def get_object(self):
from django.views.generic import (
DeleteView as DjangoDeleteView,
TemplateView as DjangoTemplateView,
ListView as DjangoListView,
DetailView as DjangoDetailView,
View as DjangoView,
CreateView as DjangoCreateView,
UpdateView as DjangoUpdateView,
FormView as DjangoFormView,
)
from djutils.views.generic import TitleMixin
from core.generic import mixins
class TemplateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoTemplateView):
pass
class View(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoView):
pass
class ListView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoListView):
pass
class DetailView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDetailView):
pass
class DeleteView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDeleteView):
pass
class DeleteView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDeleteView):
pass
class CreateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoCreateView):
pass
class UpdateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoUpdateView):
pass
class FormView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoFormView):
pass
class EditView(CreateView):
object = None
title_create = ''
def get_object(self):
obj = None
if 'pk' in self.kwargs:
obj = self.model.objects.get(id=self.kwargs['pk'])
self.object = obj
return obj
def get_title(self):
obj = self.get_object()
from core.generic import mixins
class TemplateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoTemplateView):
pass
class View(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoView):
pass
class ListView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoListView):
pass
class DetailView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDetailView):
pass
class DeleteView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDeleteView):
pass
class CreateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoCreateView):
pass
class UpdateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoUpdateView):
pass
class FormView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoFormView):
pass
class DetailView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDetailView):
pass
class DeleteView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDeleteView):
pass
class CreateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoCreateView):
pass
class UpdateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoUpdateView):
pass
class FormView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoFormView):
pass
class EditView(CreateView):
object = None
title_create = ''
def get_object(self):
obj = None
if 'pk' in self.kwargs:
obj = self.model.objects.get(id=self.kwargs['pk'])
self.object = obj
DetailView as DjangoDetailView,
View as DjangoView,
CreateView as DjangoCreateView,
UpdateView as DjangoUpdateView,
FormView as DjangoFormView,
)
from djutils.views.generic import TitleMixin
from core.generic import mixins
class TemplateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoTemplateView):
pass
class View(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoView):
pass
class ListView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoListView):
pass
class DetailView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDetailView):
pass
class DeleteView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoDeleteView):
pass
class CreateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoCreateView):
from django.shortcuts import redirect
from django.urls import reverse
from django.urls import reverse_lazy
from django.views.generic.detail import SingleObjectMixin
from djutils.views.generic import SortMixin
import core.forms.task
from core import consts
from core.utils import get_timezone
from core import models
from core.datatools import ansible
from core.generic import mixins
from core.generic import views
class Search(mixins.PermissionRequiredMixin, SortMixin, mixins.FormMixin, views.ListView):
template_name = 'core/task/search.html'
form_class = core.forms.task.Search
paginate_by = 15
title = 'Tasks'
model = models.Task
permission_required = 'core.view_task'
sort_params = ['-dc', 'template', 'dc']
def get_paginate_by(self, queryset):
if self.request.GET.get('paginate_by') == '-1':
paginate_by = queryset.count()
elif self.request.GET.get('paginate_by'):
paginate_by = self.request.GET.get('paginate_by')
else:
paginate_by = self.paginate_by
return paginate_by
from django.urls import reverse
from django.urls import reverse_lazy
from django.views.generic.detail import SingleObjectMixin
from django.forms import modelformset_factory
from djutils.views.generic import SortMixin
import core.forms.task_template
from core import consts
from core import models
from core.datatools import ansible
from core.generic import mixins
from core.generic import views
class Search(mixins.PermissionRequiredMixin, SortMixin, mixins.FormMixin, views.ListView):
template_name = 'core/task_template/search.html'
form_class = core.forms.task_template.Search
paginate_by = 15
title = 'Task templates'
model = models.TaskTemplate
permission_required = 'core.view_task_template'
sort_params = ['name', 'last_task']
def get_paginate_by(self, queryset):
if self.request.GET.get('paginate_by') == '-1':
paginate_by = queryset.count()
elif self.request.GET.get('paginate_by'):
paginate_by = self.request.GET.get('paginate_by')
else:
paginate_by = self.paginate_by
return paginate_by