You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
493 B
16 lines
493 B
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
|
|
|