parent
b857215d22
commit
0a02cc8367
2 changed files with 19 additions and 11 deletions
@ -0,0 +1,16 @@ |
|||||||
|
from django.views.generic import TemplateView |
||||||
|
|
||||||
|
from apps.course.models import Course |
||||||
|
from apps.school.models import SchoolSchedule |
||||||
|
|
||||||
|
|
||||||
|
class IndexView(TemplateView): |
||||||
|
template_name = 'templates/lilcity/main.html' |
||||||
|
|
||||||
|
def get_context_data(self): |
||||||
|
context = super().get_context_data() |
||||||
|
context.update({ |
||||||
|
'course_items': Course.objects.filter(status=Course.PUBLISHED)[:3], |
||||||
|
'school_schedules': SchoolSchedule.objects.all(), |
||||||
|
}) |
||||||
|
return context |
||||||
Loading…
Reference in new issue