# Path: backend/event_kiosk/event_kiosk/kiosks/models.py
# class Kiosk(models.Model):
#     name = models.SlugField(_('name'))
#     presentation = models.ForeignKey(to=Presentation, related_name='+', null=True, blank=True)
#     presentation_calendar = models.ManyToManyField(to=Presentation, through='KioskPresentationCalendar', through_fields=('kiosk', 'scheduledPresentation'))
# 
#     def __str__(self):
#         return self.name


from django.views.generic.base import TemplateView
from django.shortcuts import get_object_or_404, render
from .models import Kiosk
from event_kiosk.presentations.models import Slide
from django.views.decorators.csrf import csrf_exempt
from django.http import JsonResponse
import django.utils.timezone as timezone
import os
import datetime

class KioskView(TemplateView):

    template_name = "kiosk.html"

    def get_context_data(self, **kwargs):
        slug = kwargs['name']


# Path: backend/event_kiosk/event_kiosk/kiosks/models.py
# class Kiosk(models.Model):
#     name = models.SlugField(_('name'))
#     presentation = models.ForeignKey(to=Presentation, related_name='+', null=True, blank=True)
#     presentation_calendar = models.ManyToManyField(to=Presentation, through='KioskPresentationCalendar', through_fields=('kiosk', 'scheduledPresentation'))
# 
#     def __str__(self):
#         return self.name


# Path: backend/event_kiosk/event_kiosk/kiosks/views.py
from django.views.generic.base import TemplateView
from django.shortcuts import get_object_or_404, render
from .models import Kiosk
from event_kiosk.presentations.models import Slide
from django.views.decorators.csrf import csrf_exempt
from django.http import JsonResponse
import django.utils.timezone as timezone
import os
import datetime


class KioskView(TemplateView):

    template_name = "kiosk.html"

    def get_context_data(self, **kwargs):
        slug = kwargs['name']


        kiosk = get_object_or_404(Kiosk, name=slug)