diff options
author | CruiseDevice | 2019-11-10 15:23:54 +0530 |
---|---|---|
committer | CruiseDevice | 2019-11-10 15:23:54 +0530 |
commit | 7bc4033dd41c7d8f7779bc0a26ebf3069eda1d34 (patch) | |
tree | 3a27f27f3d8d64ab8d6c34c0bb07c70faa76589b | |
parent | 0e9cfea9d3c631b8eb1a77e1123f0d021f6ca63a (diff) | |
download | workshop_booking-7bc4033dd41c7d8f7779bc0a26ebf3069eda1d34.tar.gz workshop_booking-7bc4033dd41c7d8f7779bc0a26ebf3069eda1d34.tar.bz2 workshop_booking-7bc4033dd41c7d8f7779bc0a26ebf3069eda1d34.zip |
Fixes #106 #105
-rw-r--r-- | workshop_app/views.py | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/workshop_app/views.py b/workshop_app/views.py index 1a9b7a7..808f197 100644 --- a/workshop_app/views.py +++ b/workshop_app/views.py @@ -1,3 +1,26 @@ +from textwrap import dedent +from os import listdir, path, sep +from zipfile import ZipFile +import datetime as dt +import csv +import logging +try: + from StringIO import StringIO as string_io +except ImportError: + from io import BytesIO as string_io +from datetime import datetime, date +from itertools import chain + +from django.contrib.auth import login, logout, authenticate +from django.contrib.auth.decorators import login_required +from django.contrib import messages +from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger +from django.shortcuts import render, redirect +from django.utils import timezone +from django.http import HttpResponse, HttpResponseRedirect +from django.conf import settings +from django.contrib import messages + from .forms import ( UserRegistrationForm, UserLoginForm, ProfileForm, CreateWorkshop, @@ -11,27 +34,7 @@ from .models import ( Testimonial, ProfileComments, Banner ) from teams.models import Team -from datetime import datetime, date -from django.contrib.auth import login, logout, authenticate -from django.contrib.auth.decorators import login_required -from django.contrib import messages -from django.core.paginator import Paginator, EmptyPage, PageNotAnInteger -from django.shortcuts import render, redirect -from django.utils import timezone from .send_mails import send_email -from django.http import HttpResponse, HttpResponseRedirect -from textwrap import dedent -from django.conf import settings -from os import listdir, path, sep -from zipfile import ZipFile -from django.contrib import messages -import datetime as dt -import csv -import logging -try: - from StringIO import StringIO as string_io -except ImportError: - from io import BytesIO as string_io __author__ = "Akshen Doke" __credits__ = ["Mahesh Gudi", "Aditya P.", "Ankit Javalkar", @@ -706,7 +709,7 @@ def my_workshops(request): proposed_workshop_coordinator=user.id ).order_by('-proposed_workshop_date') - workshops = list(workshop_occurence_list) + list(proposed_workshop) + list(proposed_workshop_pending) + workshops = list(chain(workshop_occurence_list, proposed_workshop)) return render(request, 'workshop_app/my_workshops.html', {"workshops": workshops}) |