# Path: core/generic/views.py
# class TemplateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoTemplateView):
#     pass
# 
# Path: core/models.py
# def create_auth_token(sender, instance=None, created=False, **kwargs):
# def validate_cron(value):
#     def __init__(self, *args, **kwargs):
#     def formfield(self, **kwargs):
#     def validate(self, value, model_instance):
#     def get_actual_hosts(self) -> models.QuerySet:
#     def get_playbook_name(self) -> str:
#     def get_hosts_without_groups(self) -> models.QuerySet:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def get_vars(self):
#     def __str__(self):
#     def __str__(self):
#     def create_task(self, user, is_automatically_created=False, repeat_number=0):
#     def have_uncompleted_task(self):
#     def __str__(self):
#     def get_ansible_command(self):
#     def get_duration(self) -> datetime.timedelta:
#     def stop(self):
#     def __str__(self):
# class CronField(models.CharField):
# class TaskOperationsMixin:
# class Variable(models.Model):
#     class Meta:
# class HostGroup(models.Model):
#     class Meta:
# class Host(models.Model):
#     class Meta:
# class AnsibleUser(models.Model):
#     class Meta:
# class TaskTemplate(TaskOperationsMixin, models.Model):
#     class Meta:
# class RepeatSetting(models.Model):
# class Task(TaskOperationsMixin, models.Model):
#     class Meta:
# class TaskLog(models.Model):
#     class Meta:


from django.urls import reverse
from core.generic.views import TemplateView
from core import models



class Index(TemplateView):
    template_name = 'core/index.html'
    title = 'Ansible Manager Project'

    def get_tasks(self):
        return models.Task.objects.order_by('-dc')[:10]

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['tasks'] = self.get_tasks()
        return context
index = Index.as_view()



# Path: core/generic/views.py
# class TemplateView(mixins.BreadcrumbsMixin, mixins.NextMixin, TitleMixin, DjangoTemplateView):
#     pass
# 
# Path: core/models.py
# def create_auth_token(sender, instance=None, created=False, **kwargs):
# def validate_cron(value):
#     def __init__(self, *args, **kwargs):
#     def formfield(self, **kwargs):
#     def validate(self, value, model_instance):
#     def get_actual_hosts(self) -> models.QuerySet:
#     def get_playbook_name(self) -> str:
#     def get_hosts_without_groups(self) -> models.QuerySet:
#     def __str__(self):
#     def __str__(self):
#     def __str__(self):
#     def get_vars(self):
#     def __str__(self):
#     def __str__(self):
#     def create_task(self, user, is_automatically_created=False, repeat_number=0):
#     def have_uncompleted_task(self):
#     def __str__(self):
#     def get_ansible_command(self):
#     def get_duration(self) -> datetime.timedelta:
#     def stop(self):
#     def __str__(self):
# class CronField(models.CharField):
# class TaskOperationsMixin:
# class Variable(models.Model):
#     class Meta:
# class HostGroup(models.Model):
#     class Meta:
# class Host(models.Model):
#     class Meta:
# class AnsibleUser(models.Model):
#     class Meta:
# class TaskTemplate(TaskOperationsMixin, models.Model):
#     class Meta:
# class RepeatSetting(models.Model):
# class Task(TaskOperationsMixin, models.Model):
#     class Meta:
# class TaskLog(models.Model):
#     class Meta:


# Path: core/views/general.py
from django.urls import reverse
from core.generic.views import TemplateView
from core import models




class Index(TemplateView):
    template_name = 'core/index.html'
    title = 'Ansible Manager Project'

    def get_tasks(self):
        return models.Task.objects.order_by('-dc')[:10]

    def get_context_data(self, **kwargs):
        context = super().get_context_data(**kwargs)
        context['tasks'] = self.get_tasks()
        return context
index = Index.as_view()



class PermissionDenied(TemplateView):