From 7bc4033dd41c7d8f7779bc0a26ebf3069eda1d34 Mon Sep 17 00:00:00 2001 From: CruiseDevice Date: Sun, 10 Nov 2019 15:23:54 +0530 Subject: Fixes #106 #105 --- workshop_app/views.py | 45 ++++++++++++++++++++++++--------------------- 1 file 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}) -- cgit