2017-08-21 23:21:08 +00:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
from __future__ import unicode_literals
|
|
|
|
|
|
|
|
from django.contrib.auth.mixins import PermissionRequiredMixin
|
|
|
|
from django.views.generic.detail import DetailView
|
|
|
|
|
|
|
|
from core.models import Child
|
|
|
|
|
|
|
|
|
|
|
|
class SleepReport(PermissionRequiredMixin, DetailView):
|
2017-08-22 13:35:01 +00:00
|
|
|
"""TODO: Account for sleep sessions crossing midnight."""
|
2017-08-21 23:21:08 +00:00
|
|
|
model = Child
|
|
|
|
permission_required = ('core.view_child',)
|
|
|
|
template_name = 'reports/sleep.html'
|