summaryrefslogtreecommitdiff
path: root/workshop_app/views.py
diff options
context:
space:
mode:
authorAkshen2017-06-07 12:44:26 +0530
committerAkshen2017-06-07 12:44:26 +0530
commit114fd7636d2e9b821d3f8cae8eb288f49eae98b5 (patch)
treebe912895554d6555414f23c2ac52ca2d13335568 /workshop_app/views.py
parentead132b6b81941195a6ac8f87a2638e342929bf7 (diff)
downloadworkshop_booking-114fd7636d2e9b821d3f8cae8eb288f49eae98b5.tar.gz
workshop_booking-114fd7636d2e9b821d3f8cae8eb288f49eae98b5.tar.bz2
workshop_booking-114fd7636d2e9b821d3f8cae8eb288f49eae98b5.zip
Fixes old datesview
- Previous dates which are not booked won't be shown to coordinator and instructor - Email sending to coordinator with attachments fixed - Contact Us email changed in Homepage
Diffstat (limited to 'workshop_app/views.py')
-rw-r--r--workshop_app/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/workshop_app/views.py b/workshop_app/views.py
index 0efaf54..dafe5f9 100644
--- a/workshop_app/views.py
+++ b/workshop_app/views.py
@@ -155,10 +155,10 @@ def book(request):
workshop_details = Workshop.objects.all()
workshop_occurence_list = []
-
+ today = datetime.now()
for workshops in workshop_details:
dates = workshops.recurrences.between(
- datetime(2017, 3, 12, 0, 0, 0),
+ today,
datetime(2040, 12, 31, 0, 0, 0), #Needs to be changed yearly
inc=True
)
@@ -335,9 +335,10 @@ def manage(request):
)
workshop_occurence_list = []
+ today = datetime.now()
for workshop in workshop_details:
workshop_occurence = workshop.recurrences.between(
- datetime(2017, 3, 12, 0, 0, 0),
+ today,
datetime(2040, 12, 31, 0, 0, 0),
inc=True
)