summaryrefslogtreecommitdiff
path: root/workshop_app
diff options
context:
space:
mode:
Diffstat (limited to 'workshop_app')
-rw-r--r--workshop_app/admin.py4
-rw-r--r--workshop_app/send_mails.py2
-rw-r--r--workshop_app/views.py10
3 files changed, 8 insertions, 8 deletions
diff --git a/workshop_app/admin.py b/workshop_app/admin.py
index bc0da0a..2f8017a 100644
--- a/workshop_app/admin.py
+++ b/workshop_app/admin.py
@@ -1,10 +1,12 @@
from django.contrib import admin
from .models import (
Profile, WorkshopType,
- Workshop, ProposeWorkshopDate)
+ Workshop, ProposeWorkshopDate,
+ RequestedWorkshop)
# Register your models here.
admin.site.register(Profile)
admin.site.register(WorkshopType)
admin.site.register(Workshop)
admin.site.register(ProposeWorkshopDate)
+admin.site.register(RequestedWorkshop)
diff --git a/workshop_app/send_mails.py b/workshop_app/send_mails.py
index be7c32d..862cebd 100644
--- a/workshop_app/send_mails.py
+++ b/workshop_app/send_mails.py
@@ -325,7 +325,7 @@ def send_email( request, call_on,
message = "Issue at Workshop Booking App please check"
try:
send_mail("Issue At Workshop Booking App Mailing", message, EMAIL_HOST_USER,
- [doke.akshen@gmail.com, mahesh.p.gudi@gmail.com, aditya94palaparthy@gmail.com], fail_silently=False)
+ ['doke.akshen@gmail.com', 'mahesh.p.gudi@gmail.com', 'aditya94palaparthy@gmail.com'], fail_silently=False)
except Exception:
send_smtp_email(request=request,
subject="Issue at Workshop Booking App please check",
diff --git a/workshop_app/views.py b/workshop_app/views.py
index 2abcb31..a9e8be1 100644
--- a/workshop_app/views.py
+++ b/workshop_app/views.py
@@ -19,7 +19,6 @@ from django.shortcuts import render, redirect
from django.db import IntegrityError
from django.utils import timezone
from collections import OrderedDict
-from .decorators import email_verified
from dateutil.parser import parse
from .send_mails import send_email
from django.http import HttpResponse, HttpResponseRedirect
@@ -270,7 +269,6 @@ def book_workshop(request):
else:
for w in workshop_recurrence_list:
if workshop_date == (w.strftime("%d-%m-%Y")):
- print(workshop_date)
rW_obj.requested_workshop_instructor = workshop.workshop_instructor
rW_obj.requested_workshop_coordinator = request.user
rW_obj.requested_workshop_date = datetime.strptime(
@@ -583,9 +581,8 @@ def my_workshops(request):
except EmptyPage:
#If page is out of range(e.g 999999), deliver last page.
workshop_occurences = paginator.page(paginator.num_pages)
- template = 'workshop_app/my_workshops.html'
-
-
+ return render(request, 'workshop_app/my_workshops.html',
+ { "workshop_occurences" :workshop_occurences})
else:
workshops = []
@@ -612,7 +609,8 @@ def my_workshops(request):
except EmptyPage:
#If page is out of range(e.g 999999), deliver last page.
workshop_occurences = paginator.page(paginator.num_pages)
- template = 'workshop_app/my_workshops.html'
+ return render(request, 'workshop_app/my_workshops.html',
+ {"workshop_occurences": workshop_occurences})
else:
return redirect('/login/')