From b0c2a45920a0ae7c0c2054ad403cb7d326bc39eb Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 26 Sep 2019 15:29:47 +0530 Subject: Add banner management system to workshop website --- workshop_app/views.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'workshop_app/views.py') diff --git a/workshop_app/views.py b/workshop_app/views.py index 961445a..1a8015a 100644 --- a/workshop_app/views.py +++ b/workshop_app/views.py @@ -8,7 +8,7 @@ from .models import ( has_profile, Workshop, WorkshopType, RequestedWorkshop, BookedWorkshop, ProposeWorkshopDate, - Testimonial, ProfileComments + Testimonial, ProfileComments, Banner ) from datetime import datetime, date from django.contrib.auth import login, logout, authenticate @@ -71,8 +71,13 @@ def index(request): return redirect('/manage/') return redirect('/book/') - return render(request, "workshop_app/index.html", {"form": form, - "testimonials": testimonials }) + return render(request, "workshop_app/index.html", + { + "form": form, + "testimonials": testimonials, + "banners": Banner.objects.all(), + } + ) def is_instructor(user): -- cgit