summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--workshop_app/models.py77
-rw-r--r--workshop_app/send_mails.py23
-rw-r--r--workshop_app/static/workshop_app/css/faq.css15
-rw-r--r--workshop_app/static/workshop_app/css/index.css4
-rw-r--r--workshop_app/static/workshop_app/css/new_index.css42
-rw-r--r--workshop_app/templates/workshop_app/how_to_participate.html10
-rw-r--r--workshop_app/templates/workshop_app/index.html29
-rw-r--r--workshop_app/templates/workshop_app/my_workshops.html26
-rw-r--r--workshop_app/templates/workshop_app/new_index.html3
-rw-r--r--workshop_app/templates/workshop_app/self_workshop.html6
-rw-r--r--workshop_app/templates/workshop_app/view_benefits.html6
-rw-r--r--workshop_app/templates/workshop_app/view_faq.html35
-rw-r--r--workshop_app/templates/workshop_app/view_workshoptype_details.html3
-rw-r--r--workshop_app/templates/workshop_app/view_workshoptype_list.html32
-rw-r--r--workshop_app/urls.py12
-rw-r--r--workshop_app/views.py46
16 files changed, 143 insertions, 226 deletions
diff --git a/workshop_app/models.py b/workshop_app/models.py
index 227f693..f9585f4 100644
--- a/workshop_app/models.py
+++ b/workshop_app/models.py
@@ -1,4 +1,3 @@
-
from django.db import models
from django.contrib.auth.models import User
from django.core.validators import RegexValidator
@@ -37,7 +36,6 @@ title = (
)
source = (
- ("FOSSEE fellowship", "FOSSEE fellowship"),
("FOSSEE Email", "FOSSEE Email"),
("FOSSEE website", "FOSSEE website"),
("Google", "Google"),
@@ -47,13 +45,13 @@ source = (
)
states = (
- ("IN-AP", "Andhra Pradesh"),
- ("IN-AR", "Arunachal Pradesh"),
- ("IN-AS", "Assam"),
- ("IN-BR", "Bihar"),
- ("IN-CT", "Chhattisgarh"),
- ("IN-GA", "Goa"),
- ("IN-GJ", "Gujarat"),
+ ("IN-AP", "Andhra Pradesh"),
+ ("IN-AR", "Arunachal Pradesh"),
+ ("IN-AS", "Assam"),
+ ("IN-BR", "Bihar"),
+ ("IN-CT", "Chhattisgarh"),
+ ("IN-GA", "Goa"),
+ ("IN-GJ", "Gujarat"),
("IN-HR", "Haryana"),
("IN-HP", "Himachal Pradesh"),
("IN-JK", "Jammu and Kashmir"),
@@ -69,29 +67,32 @@ states = (
("IN-OR", "Odisha"),
("IN-PB", "Punjab"),
("IN-RJ", "Rajasthan"),
- ("IN-SK", "Sikkim"),
- ("IN-TN", "Tamil Nadu"),
- ("IN-TG", "Telangana"),
+ ("IN-SK", "Sikkim"),
+ ("IN-TN", "Tamil Nadu"),
+ ("IN-TG", "Telangana"),
("IN-TR", "Tripura"),
- ("IN-UT", "Uttarakhand"),
- ("IN-UP", "Uttar Pradesh"),
+ ("IN-UT", "Uttarakhand"),
+ ("IN-UP", "Uttar Pradesh"),
("IN-WB", "West Bengal"),
("IN-AN", "Andaman and Nicobar Islands"),
- ("IN-CH", "Chandigarh"),
- ("IN-DN", "Dadra and Nagar Haveli"),
- ("IN-DD", "Daman and Diu"),
- ("IN-DL", "Delhi"),
- ("IN-LD", "Lakshadweep"),
- ("IN-PY", "Puducherry")
+ ("IN-CH", "Chandigarh"),
+ ("IN-DN", "Dadra and Nagar Haveli"),
+ ("IN-DD", "Daman and Diu"),
+ ("IN-DL", "Delhi"),
+ ("IN-LD", "Lakshadweep"),
+ ("IN-PY", "Puducherry")
)
+
def has_profile(user):
""" check if user has profile """
return True if hasattr(user, 'profile') else False
+
def attachments(instance, filename):
return os.sep.join((instance.workshoptype_name.replace(" ", '_'), filename))
+
class Profile(models.Model):
"""Profile for users(instructors and coordinators)"""
@@ -111,7 +112,7 @@ class Profile(models.Model):
position = models.CharField(max_length=32, choices=position_choices,
default='coordinator',
help_text='Select Coordinator if you want to organise a workshop\
- in your college/school. <br> Select Instructor if you want to conduct\
+ in your college/school. <br> Select Instructor if you want to conduct\
a workshop.')
how_did_you_hear_about_us = models.CharField(max_length=255, blank=True,choices=source)
location = models.CharField(max_length=255,blank=True, help_text="Place/City")
@@ -123,20 +124,20 @@ class Profile(models.Model):
def __str__(self):
return u"id: {0}| {1} {2} | {3} ".format(
self.user.id,
- self.user.first_name,
- self.user.last_name,
+ self.user.first_name,
+ self.user.last_name,
self.user.email
)
class WorkshopType(models.Model):
- """"Admin creates types of workshops which can be used by the instructor
+ """"Admin creates types of workshops which can be used by the instructor
to create workshops.
"""
workshoptype_name = models.CharField(max_length=120)
workshoptype_description = models.TextField()
- workshoptype_duration = models.CharField(max_length=32,
+ workshoptype_duration = models.CharField(max_length=32,
help_text='Please write this in \
following format eg: 3days, 8hours a day')
workshoptype_attachments = models.FileField(upload_to=attachments, blank=True,
@@ -146,7 +147,7 @@ class WorkshopType(models.Model):
WorkshopType Name')
def __str__(self):
- return u"{0} {1}".format(self.workshoptype_name,
+ return u"{0} {1}".format(self.workshoptype_name,
self.workshoptype_duration
)
@@ -165,7 +166,7 @@ class Workshop(models.Model):
def __str__(self):
return u"{0} | {1} ".format(
- self.workshop_title,
+ self.workshop_title,
self.workshop_instructor
)
@@ -180,7 +181,7 @@ class RequestedWorkshop(models.Model):
on_delete=models.CASCADE
)
requested_workshop_coordinator = models.ForeignKey(
- User,
+ User,
related_name="%(app_label)s_%(class)s_related"
)
requested_workshop_date = models.DateField()
@@ -188,33 +189,34 @@ class RequestedWorkshop(models.Model):
max_length=32, default="Pending"
)
requested_workshop_title = models.ForeignKey(
- WorkshopType,
+ WorkshopType,
on_delete=models.CASCADE
)
def __str__(self):
return u"{0} | {1} | {2}| {3}".format(
- self.requested_workshop_date,
+ self.requested_workshop_date,
self.requested_workshop_title,
self.requested_workshop_coordinator,
self.status
)
+
class ProposeWorkshopDate(models.Model):
"""
Contains details of proposed date and workshop from coordinator
"""
condition_one = models.BooleanField(default=False, help_text='We assure to\
- give minimum 50 participants for the workshop.')
+ give minimum 30 participants for the workshop.')
condition_two = models.BooleanField(default=False, help_text='We agree \
that this booking won\'t be cancelled without \
- 2days of prior notice to the instructor and fossee.')
+ 2days of prior notice to the instructor and fossee.')
condition_three = models.BooleanField(default=False, help_text='This \
proposal is subject to FOSSEE and instructor approval.')
proposed_workshop_coordinator = models.ForeignKey(
- User,
+ User,
on_delete=models.CASCADE
)
proposed_workshop_instructor = models.ForeignKey(User, null=True,
@@ -233,7 +235,7 @@ class ProposeWorkshopDate(models.Model):
def __str__(self):
return u"{0} | {1} | {2}| {3}".format(
- self.proposed_workshop_date,
+ self.proposed_workshop_date,
self.proposed_workshop_title,
self.proposed_workshop_coordinator,
self.status
@@ -245,8 +247,8 @@ class BookedWorkshop(models.Model):
Contains details about Confirmed Booked/Completed Workshops
"""
- booked_workshop_requested = models.ForeignKey(RequestedWorkshop, null=True)
- booked_workshop_proposed = models.ForeignKey(ProposeWorkshopDate, null=True)
+ booked_workshop_requested = models.ForeignKey(RequestedWorkshop, null=True)
+ booked_workshop_proposed = models.ForeignKey(ProposeWorkshopDate,null=True)
def __str__(self):
return u"{0} | {1} |".format(
@@ -254,6 +256,7 @@ class BookedWorkshop(models.Model):
self.booked_workshop_proposed
)
+
class Testimonial(models.Model):
"""
Contains Testimonals of Workshops
@@ -266,7 +269,7 @@ class Testimonial(models.Model):
def __str__(self):
return u"{0} | {1} ".format(
- self.name,
+ self.name,
self.institute,
self.department
)
diff --git a/workshop_app/send_mails.py b/workshop_app/send_mails.py
index 81a7d50..3826ec8 100644
--- a/workshop_app/send_mails.py
+++ b/workshop_app/send_mails.py
@@ -364,29 +364,6 @@ def send_email( request, call_on,
format(workshop_date), message, SENDER_EMAIL,
[other_email], fail_silently=False)
- elif call_on == 'ShareMail':
-
- for eid in other_email:
- if validateEmail(eid):
- message = dedent("""\
- Hi {0},
-
- I am Sharing with you FOSSEE's Python Workshop List
- {1}/view_workshoptype_details
- You can register {2}/register and start booking/proposing
- workshops for your school, college, university/company.
-
- Regards,
- {3}
- """.format(eid, PRODUCTION_URL, PRODUCTION_URL,
- request.user.email)
- )
- logging.info("Sharing Email Send to: %s ", eid)
- send_mail("Hey Checkout FOSSEE's Python Workshop List", message,
- SENDER_EMAIL, [eid])
- else:
- logging.warning("Invalid EmailId: %s ", eid)
-
elif call_on == 'Change Date':
if user_position == "instructor":
message = dedent("""\
diff --git a/workshop_app/static/workshop_app/css/faq.css b/workshop_app/static/workshop_app/css/faq.css
index d391d3a..4f2a74a 100644
--- a/workshop_app/static/workshop_app/css/faq.css
+++ b/workshop_app/static/workshop_app/css/faq.css
@@ -1,6 +1,13 @@
.num {
- list-style-type: square;
- font-family: 'Antic Slab';
- font-size: 22px;
+ font-family: 'Antic Slab';
+ font-size: 17px;
border-bottom: 1.5px solid #BDBDBD;
-} \ No newline at end of file
+}
+
+.num > h2, h4 {
+ color: #04a9cf;
+}
+
+.ans {
+ color: grey;
+}
diff --git a/workshop_app/static/workshop_app/css/index.css b/workshop_app/static/workshop_app/css/index.css
index eafc794..2444a50 100644
--- a/workshop_app/static/workshop_app/css/index.css
+++ b/workshop_app/static/workshop_app/css/index.css
@@ -10,9 +10,9 @@
ul.topnav {
list-style-type: none;
- margin: 20px;
+ margin: 10px;
padding: 0;
- overflow: hidden;
+ overflow: hidden;
}
ul.topnav li {float: right;}
diff --git a/workshop_app/static/workshop_app/css/new_index.css b/workshop_app/static/workshop_app/css/new_index.css
index 0f0e8e2..f194ec2 100644
--- a/workshop_app/static/workshop_app/css/new_index.css
+++ b/workshop_app/static/workshop_app/css/new_index.css
@@ -49,7 +49,7 @@ ul.topnav li.right {float: right;}
width: 100%;
margin: auto;
align-content: center;
-
+
}
@font-face {
@@ -61,7 +61,7 @@ ul.topnav li.right {float: right;}
#r1_c1
{
- font-family: "Bitstream Vera Sans", Helvetica;
+ font-family: aaragh, Helvetica, Arial, sans-serif;
font-size: 30px;
background-image: url("../img/hd_bg.png");
background-repeat: no-repeat;
@@ -118,6 +118,7 @@ ul.topnav li.right {float: right;}
background: linear-gradient(135deg , #2c5aa0,#2c5aa0 30%, #3bb1d1 );
padding-bottom: 25px;
margin-top: 15px;
+ font-family: aaragh, Arial, sans-serif;
}
@@ -129,14 +130,14 @@ ul.topnav li.right {float: right;}
#r5_c1 {
text-align: center;
font-size: 2vw;
- font-family: aaragh;
+ font-family: aaragh, Arial, sans-serif;
margin-top: 10px;
}
#r5_c2 {
- font-family: aaragh;
-
+ font-family: aaragh, Arial, sans-serif;
+
}
#r5_c3 {
@@ -148,7 +149,7 @@ ul.topnav li.right {float: right;}
margin-top: 15px;
width: 100%;
background: linear-gradient(135deg , #2c5aa0,#2c5aa0 30%, #3bb1d1 );
-
+
}
#r6_c2 {
@@ -182,30 +183,6 @@ ul.topnav li.right {float: right;}
}
-#email {
- width: 40%;
- padding: 12px 20px;
- margin: 8px 0;
- box-sizing: border-box;
- border-radius: 5px;
-}
-
-#name {
- width: 40%;
- padding: 12px 20px;
- margin: 8px 0;
- box-sizing: border-box;
- border-radius: 5px;
-}
-
-#msg {
- width: 75%;
- padding: 12px 20px;
- margin: 8px 0;
- box-sizing: border-box;
- border-radius: 5px;
-}
-
#r8 {
background: #c8c5b6;
margin-top: 15px;
@@ -218,9 +195,8 @@ ul.topnav li.right {float: right;}
#r8_c2 {
font-size: 16px;
-
+ font-family: aaragh;
text-align: center;
-
}
#social {
@@ -230,8 +206,8 @@ ul.topnav li.right {float: right;}
#r8_c4 {
text-align: center;
font-size: 12px;
-
width: 100%;
+ font-family: aaragh;
}
hr {
diff --git a/workshop_app/templates/workshop_app/how_to_participate.html b/workshop_app/templates/workshop_app/how_to_participate.html
index c33609c..f0d4646 100644
--- a/workshop_app/templates/workshop_app/how_to_participate.html
+++ b/workshop_app/templates/workshop_app/how_to_participate.html
@@ -33,7 +33,7 @@
</ul>
{% else %}
<div class="navbar-header">
- <a class="navbar-brand" href="{{URL_ROOT}}/">Home</a>
+ <a class="navbar-brand" href="{{URL_ROOT}}/">FOSSEE Workshops</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/register/"><span class="glyphicon glyphicon-user"></span> Register</a></li>
@@ -47,8 +47,12 @@
{% block content %}
<div class="container-fluid text-center" >
- <img src="{{ URL_ROOT }}/static/workshop_app/img/structure.png">
+ <div class="row">
+ <div class="col-md-12">
+ <img style="width:100%; height:auto;" src="{{ URL_ROOT }}/static/workshop_app/img/structure.png">
+ </div>
+ </div>
<br><br>
</div>
-{% endblock %} \ No newline at end of file
+{% endblock %}
diff --git a/workshop_app/templates/workshop_app/index.html b/workshop_app/templates/workshop_app/index.html
index a5f6b0a..bf46616 100644
--- a/workshop_app/templates/workshop_app/index.html
+++ b/workshop_app/templates/workshop_app/index.html
@@ -16,14 +16,14 @@
<!-- Add icon library -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
+ <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<!-- Custom JS -->
<script src="{{ URL_ROOT }}/static/workshop_app/js/index.js"></script>
<title>Welcome</title>
-
+
<script>
$(function() {
$(".rslides").responsiveSlides({
@@ -38,7 +38,7 @@
});
</script>
-
+
</head>
<body class="container">
@@ -50,6 +50,7 @@
<ul class="topnav">
<li><a href="{{URL_ROOT}}/statistics/public_stats/">Stats</a></li>
<li><a href="{{URL_ROOT}}/login">Login</a></li>
+ <li><a href="{{URL_ROOT}}/how_to_participate">How to Participate</a></li>
<li><a href="{{URL_ROOT}}/register">Sign Up</a></li>
<li ><a href="https://python.fossee.in/about">About Us</a></li>
</ul>
@@ -58,7 +59,7 @@
<div class="row" id="r2">
<div class="col-md-6 rslides" id="r2_c1">
-
+
<img src="{{ URL_ROOT}}/static/workshop_app/img/intro_img_1.png" >
<img src="{{ URL_ROOT}}/static/workshop_app/img/intro_img_2.png" >
<img src="{{ URL_ROOT}}/static/workshop_app/img/intro_img_3.png" >
@@ -85,11 +86,11 @@
<div class="row" id="r4">
<div class="col-md-4">
<br>
- <a href="{{URL_ROOT}}/view_workshoptype_details/1"><img src="{{ URL_ROOT}}/static/workshop_app/img/Crs_1.png" style="width: 100%;"></a>
+ <a href="{{URL_ROOT}}/view_workshoptype_details/4"><img src="{{ URL_ROOT}}/static/workshop_app/img/Crs_1.png" style="width: 100%;"></a>
</div>
<div class="col-md-4">
<br>
- <a href="{{URL_ROOT}}/view_workshoptype_details/2"><img src="{{ URL_ROOT}}/static/workshop_app/img/Crs_2.png" style="width: 100%;"></a>
+ <a href="{{URL_ROOT}}/view_workshoptype_details/5"><img src="{{ URL_ROOT}}/static/workshop_app/img/Crs_2.png" style="width: 100%;"></a>
</div>
<div class="col-md-4">
<br>
@@ -102,19 +103,19 @@
</div>
<div class="col-md-6" id="r5_c2"><img src="{{ URL_ROOT}}/static/workshop_app/img/icon_1.png"><br><br>
- <h5 style="color: #3bb1d1;">Learn Python for Free,</h5>
+ <h5 style="color: #3bb1d1;">Learn Python for Free,</h5>
<h5 style="color: #3bb1d1;">Many exercises/practice problems</h5> <br>
<h5 style="color: #3bb1d1;"> Instructor support for your queries during workshop(s)</h5> <br>
<h5 style="color: #3bb1d1;">Get e-certificate</h5>
-
+
</div>
<div class="col-md-6" id="r5_c3"><img src="{{ URL_ROOT}}/static/workshop_app/img/adv_img.png" style="width: 100%;"></div>
</div>
<div class="row" id="r6">
-
- <div class="col-md-12 tslides" id="r6_c2" >
+
+ <div class="col-md-12 tslides" id="r6_c2" >
<li>{{ testimonials.0.message }} <br> <br>
<span>~ {{testimonials.0.name}} ~<br>
{{testimonials.0.institute}} </span></li>
@@ -138,16 +139,16 @@
<br> <br>
<img src="{{ URL_ROOT}}/static/workshop_app/img/fossee_logo_iitb.png" >
</div>
-
+
<div class="col-md-4" id="r8_c2" >
<br> <br>
- FOSSEE,
+ FOSSEE,
IIT-Bombay <br>Mumbai, India <br>
Phone: (+91) 22 2576 4133 <br>
Email: workshops[at]fossee[dot]in
</div>
-
- <div class="col-md-4" id="r8_c3" >
+
+ <div class="col-md-4" id="r8_c3" >
<div id="social">
<br> <br>
<a href="https://www.facebook.com/FOSSEENMEICT/" target="_blank" class="fa fa-facebook"></a> &nbsp;
diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html
index e3db7ca..3f2a676 100644
--- a/workshop_app/templates/workshop_app/my_workshops.html
+++ b/workshop_app/templates/workshop_app/my_workshops.html
@@ -157,15 +157,15 @@
{% block content %}
{% if workshop_occurences %}
- <h3 align="center">The status of your workshops </h3>
+ <h3 align="center" style="color:#2952a2;">The status of your workshops </h3>
<br>
<!-- Pending View -->
<div class="container">
{% if request.user.profile.position == 'instructor' %}
- <h3 align="center"><strong><u>Requests for Me</u></strong></h3>
+ <h3 align="center" style="color: #04a9cf;"><strong><u>Requests for Me</u></strong></h3>
{% else %}
- <h3 align="center"><strong><u>My Requests</u></strong></h3>
+ <h3 align="center" style="color: #04a9cf;"><strong><u>My Requests</u></strong></h3>
{% endif %}
<table class="table table-striped">
<thead>
@@ -207,7 +207,7 @@
<!-- Accepted View -->
<div class="container">
- <h3 align="center"><strong><u>Workshops Accepted</u></strong></h3>
+ <h3 align="center" style="color: #04a9cf;"><strong><u>Workshops Accepted</u></strong></h3>
<table class="table table-striped">
<thead>
<tr>
@@ -240,7 +240,7 @@
class="datepicker" onclick="changeDate('R,{{ workshop.requested_workshop_date| safe}}, {{forloop.counter}}')">
</span>
<div class="myDialogR{{forloop.counter}}" style="display: none;" title="Select New Date">
-
+
<input type="text" class="rDate{{forloop.counter}}" /><br>
<button class="btn btn-primary btn-xs" type="submit" onclick="submitNewDate('{{forloop.counter}},R,{{workshop.requested_workshop_instructor_id}},{{workshop.requested_workshop_coordinator_id}},{{ workshop.requested_workshop_title_id }},{{ workshop.requested_workshop_date | safe}}')">Save</button>
</div>
@@ -265,7 +265,7 @@
onclick="changeDate('P,{{ workshop.proposed_workshop_date | safe}}, {{forloop.counter}}')">
</span>
<div class="myDialogP{{forloop.counter}}" style="display: none;" title="Select New Date">
-
+
<input type="text" class="pDate{{forloop.counter}}" /><br>
<button class="btn btn-primary btn-xs" type="submit" onclick="submitNewDate('{{forloop.counter}},P,{{workshop.proposed_workshop_instructor_id}},{{workshop.proposed_workshop_coordinator_id}},{{ workshop.proposed_workshop_title_id }},{{ workshop.proposed_workshop_date | safe}}')">Update</button>
</div>
@@ -277,7 +277,7 @@
{% endif %}
</tr>
</tbody>
-
+
{% endfor %}
</table>
@@ -287,9 +287,9 @@
<!-- Proposed View -->
<div class="container">
{% if request.user.profile.position == 'instructor' %}
- <h3 align="center"><strong><u>Workshops Proposed By Coordinators</u></strong></h3>
+ <h3 align="center" style="color: #04a9cf;"><strong><u>Workshops Proposed By Coordinators</u></strong></h3>
{% else %}
- <h3 align="center"><strong><u>Workshops Proposed By Me</u></strong></h3>
+ <h3 align="center" style="color: #04a9cf;"><strong><u>Workshops Proposed By Me</u></strong></h3>
{% endif %}
<table class="table table-striped">
<thead>
@@ -297,7 +297,7 @@
{% if request.user.profile.position == 'instructor' %}
<th>Coordinator Name</th>
{% else %}
-
+
{% endif %}
<th>Workshop Name</th>
<th>Workshop Day</th>
@@ -314,7 +314,7 @@
{% endif %}
<td>{{ workshop.proposed_workshop_title }}</td>
<td>{{ workshop.proposed_workshop_date | date }}</td>
-
+
<td><span class = "label label-warning">{{ workshop.status }}</span></td>
{% if request.user.profile.position == 'instructor' and workshop.status == 'Pending' %}
<td><button class="btn btn-primary btn-sm" id="book-btn" onClick="sendData('{{workshop.proposed_workshop_coordinator}},{{workshop.proposed_workshop_date| safe}},{{ workshop.proposed_workshop_title_id }},APPROVED')" data-toggle="popover" title="Please Note" data-content="Once Accepted you can't Reject, you have to personally contact the Coordinator if the workshop is to be cancelled"> Accept</button></td>
@@ -322,7 +322,7 @@
{% endif %}
</tr>
</tbody>
-
+
{% endfor %}
</table>
</div>
@@ -330,7 +330,7 @@
<!-- Deleted/Rejected View -->
<div class="container">
- <h3 align="center"><strong><u>Workshops Deleted/Rejected</u></strong></h3>
+ <h3 align="center" style="color: #04a9cf;"><strong><u>Workshops Deleted/Rejected</u></strong></h3>
<table class="table table-striped">
<thead>
<tr>
diff --git a/workshop_app/templates/workshop_app/new_index.html b/workshop_app/templates/workshop_app/new_index.html
index f44b82f..4603ac7 100644
--- a/workshop_app/templates/workshop_app/new_index.html
+++ b/workshop_app/templates/workshop_app/new_index.html
@@ -1,4 +1,3 @@
-
<!DOCTYPE html>
<html>
<head>
@@ -164,4 +163,4 @@
</div>
</body>
-</html> \ No newline at end of file
+</html>
diff --git a/workshop_app/templates/workshop_app/self_workshop.html b/workshop_app/templates/workshop_app/self_workshop.html
index 6b9e126..b67ad52 100644
--- a/workshop_app/templates/workshop_app/self_workshop.html
+++ b/workshop_app/templates/workshop_app/self_workshop.html
@@ -25,8 +25,8 @@
{% block content %}
-<div class="container">
- <h1>Welcome to Python Self Learning Course</h1><br>
+ <div class="container">
+ <h1 style="color:#2952a2;">Welcome to Python Self Learning Course</h1><br>
<ul class='num'>
<h2>About this Course:</h2>
<ul>
@@ -100,4 +100,4 @@
</div>
<br>
<br>
-{% endblock %} \ No newline at end of file
+{% endblock %}
diff --git a/workshop_app/templates/workshop_app/view_benefits.html b/workshop_app/templates/workshop_app/view_benefits.html
index 9b2594d..2a622d7 100644
--- a/workshop_app/templates/workshop_app/view_benefits.html
+++ b/workshop_app/templates/workshop_app/view_benefits.html
@@ -49,14 +49,14 @@
{% block content %}
<div class="container">
- <h1 style="font-family: 'Times New Roman';">Features and Benefits:</h1><br>
- <p ><h4 style="font-family: 'Antic Slab';">
+ <h1 style="font-family: 'Antic Slab'; color:#2952a2">Features and Benefits:</h1><br>
+ <p><h4 style="font-family: 'Antic Slab'; color: #04a9cf;">
The workshops can be arranged at your convenience.
Hands-on experience in Python programming with many practice sessions and quizzes.
Certificates and honorarium will be provided on successful completion.
</h4></p>
<br>
- <p><h4 style="font-family: 'Antic Slab';">
+ <p><h4 style="font-family: 'Antic Slab'; color: #04a9cf;">
Hone your programming skills in Python.
Live video/chat assistance from FOSSEE Python experts
Closely integrated with online programming evaluation tool.
diff --git a/workshop_app/templates/workshop_app/view_faq.html b/workshop_app/templates/workshop_app/view_faq.html
index 6efe66b..8860f35 100644
--- a/workshop_app/templates/workshop_app/view_faq.html
+++ b/workshop_app/templates/workshop_app/view_faq.html
@@ -49,116 +49,115 @@
{% block content %}
<div class="container">
- <h1>FAQs-</h1><br>
+ <h1 style="color: #2962B9;"> FAQs-</h1><br>
<ul class='num'>
+ <h4>Who can participate in these workshops?</h4>
<li class='ans'>
- Who can participate in these workshops?<br>
-
Anyone interested in learning Python irrespective of their domain can participate.
</li>
</ul>
<ul class='num'>
+ <h4>Will the participants receive certificates?</h4>
<li class='ans'>
- Will the participants receive certificates?<br>
Yes, graded certificates shall be issued only after successfully clearing our post-workshop assessments/tests.
</li>
</ul>
<ul class='num'>
+ <h4> Will the coordinators receive certificates?</h4>
<li class='ans'>
- Will the coordinators receive certificates?<br>
Yes, even the coordinators of the workshops are awarded certificates.
</li>
</ul>
<ul class='num'>
+ <h4> When will I get my certificate?</h4>
<li class='ans'>
- When will I get my certificate?<br>
Within 15 working days from the last day of the workshop.
</li>
</ul>
<ul class='num'>
+ <h4> How many coordinators are required to conduct a workshop?</h4>
<li class='ans'>
- How many coordinators are required to conduct a workshop?<br>
One coordinator for 50 participants.
</li>
</ul>
<ul class='num'>
+ <h4> Do we have to pay for the workshop?</h4>
<li class='ans'>
- Do we have to pay for the workshop?<br>
No, the workshop is free of charge
</li>
</ul>
<ul class='num'>
+ <h4> Do I have to register?</h4>
<li class='ans'>
- Do I have to register?<br>
Yes, only the coordinator of the workshop will have to register.
</li>
</ul>
<ul class='num'>
+ <h4> Can we conduct this workshop as per our convenience?</h4>
<li class='ans'>
- Can we conduct this workshop as per our convenience?<br>
Absolutely! You may conduct the workshop as per your lab availability.
</li>
</ul>
<ul class='num'>
+ <h4> What is the approximate wait time after requesting for a workshop?</h4>
<li class='ans'>
- What is the approximate wait time after requesting for a workshop?<br>
It could be between 1-2 weeks (subject to availability of our instructors).
</li>
</ul>
<ul class='num'>
+ <h4> How will the workshop be conducted?</h4>
<li class='ans'>
- How will the workshop be conducted?<br>
It will be a hands-on workshop with remote assistance by a FOSSEE instructor at IIT Bombay.
</li>
</ul>
<ul class='num'>
+ <h4> Could we have the instructor at our institute for the workshop?</h4>
<li class='ans'>
- Could we have the instructor at our institute for the workshop?<br>
Unfortunately, we will not be able to send our instructor(s) to your institute.
</li>
</ul>
<ul class='num'>
+ <h4>I am from a non-technical background but wish to learn Python. Can I participate in this workshop?</h4>
<li class='ans'>
- I am from a non-technical background but wish to learn Python. Can I participate in this workshop?<br>
Yes, of course. This is open to anyone from any field who is interested in learning Python.
</li>
</ul>
<ul class='num'>
+ <h4> Can I use the material of this workshop in my class?</h4>
<li class='ans'>
- Can I use the material of this workshop in my class?<br>
Sure, you can use our video lectures.
</li>
</ul>
<ul class='num'>
+ <h4> Are these workshops provided to individuals as well?</h4>
<li class='ans'>
- Are these workshops provided to individuals as well?<br>
Currently, this program is exclusively available for institutes only. However, if you are not associated with an institute and are willing to participate in this workshop, please write to us at workshops[at]fossee[dot]in
</li>
</ul>
<ul class='num'>
+ <h4> What are the equipments required for conducting this workshop?</h4>
<li class='ans'>
- What are the equipments required for conducting this workshop?<br>
A room with projector, speaker, microphone, laptops/desktops for every participant, high-speed internet and one laptop with a webcam.
</li>
</ul>
<ul class='num'>
+ <h4>What are the video-audio conferencing tools used for this workshop?</h4>
<li class='ans'>
- What are the video-audio conferencing tools used for this workshop?<br>
We will use any of these tools: Skype, appear.in and hangouts
</li>
</ul>
diff --git a/workshop_app/templates/workshop_app/view_workshoptype_details.html b/workshop_app/templates/workshop_app/view_workshoptype_details.html
index 5ca454a..a60bb54 100644
--- a/workshop_app/templates/workshop_app/view_workshoptype_details.html
+++ b/workshop_app/templates/workshop_app/view_workshoptype_details.html
@@ -19,6 +19,7 @@
</ul>
</div>
</nav>
+ <link href='//fonts.googleapis.com/css?family=Antic Slab' rel='stylesheet'>
{% endblock %}
{% block extra %}
@@ -31,7 +32,7 @@
{% block content %}
<div class="container">
- {{ workshoptype.workshoptype_description | safe }}
+ {{ workshoptype.workshoptype_description | safe }}
</div>
{% endblock %}
diff --git a/workshop_app/templates/workshop_app/view_workshoptype_list.html b/workshop_app/templates/workshop_app/view_workshoptype_list.html
index 6011a2e..c9dde8d 100644
--- a/workshop_app/templates/workshop_app/view_workshoptype_list.html
+++ b/workshop_app/templates/workshop_app/view_workshoptype_list.html
@@ -112,8 +112,6 @@
</tbody>
{% endfor %}
</table>
- <a style="color: white;" href="{{ URL_ROOT }}/book/"><button class="btn btn-primary btn-lg" style="float: right;">Start Booking Now</button></a>
-<button id="mailBtn" class="btn btn-info btn-lg">Share Details</button>
</div>
<!-- The Modal -->
@@ -158,34 +156,6 @@
</ul>
</nav>
</div>
- </div> <script>
- // Get the modal
- var modal = document.getElementById("mailModal");
-
- // Get the button that opens the modal
- var btn = document.getElementById("mailBtn");
-
- // Get the <span> element that closes the modal
- var span = document.getElementsByClassName("close")[0];
-
- // When the user clicks the button, open the modal
- btn.onclick = function() {
- modal.style.display = "block";
- }
-
- // When the user clicks on <span> (x), close the modal
- span.onclick = function() {
- modal.style.display = "none";
- }
-
- // When the user clicks anywhere outside of the modal, close it
- window.onclick = function(event) {
- if (event.target == modal) {
- modal.style.display = "none";
- }
- }
-
-
- </script>
+ </div>
{% endblock %}
diff --git a/workshop_app/urls.py b/workshop_app/urls.py
index 8123dea..44274dc 100644
--- a/workshop_app/urls.py
+++ b/workshop_app/urls.py
@@ -13,10 +13,8 @@ Including another URLconf
1. Import the include() function: from django.conf.urls import url, include
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls'))
"""
-from django.conf.urls import url, include
-from django.contrib import admin
+from django.conf.urls import url
from workshop_app import views
-#from chatterbot.ext.django_chatterbot import urls as chatterbot_urls
import django
js_info_dict = {
@@ -40,16 +38,14 @@ urlpatterns = [
url(r'^faq/$', views.faq),
url(r'^manage/$', views.manage),
url(r'^view_workshoptype_list/$', views.view_workshoptype_list),
- url(r'^view_workshoptype_details/([1-9][0-9]*)$', views.view_workshoptype_details),
+ url(r'^view_workshoptype_details/([1-9][0-9]*)$', \
+ views.view_workshoptype_details),
url(r'^create_workshop/$', views.create_workshop),
url(r'^propose_workshop/$', views.propose_workshop),
url(r'^workshop_stats/$', views.workshop_stats),
url(r'^testimonials/$', views.testimonials),
- url(r'^share_details/$', views.share_details),
url(r'^file_view/(?P<workshop_title>[\w|\W]+)$', views.file_view),
url(r'^jsi18n/$', django.views.i18n.javascript_catalog, js_info_dict),
- #url(r'^api/chatterbot/', include(chatterbot_urls, namespace='chatterbot')),
url(r'^self_workshop', views.self_workshop),
-
-]
+ ]
diff --git a/workshop_app/views.py b/workshop_app/views.py
index 051f447..efa36bc 100644
--- a/workshop_app/views.py
+++ b/workshop_app/views.py
@@ -10,25 +10,19 @@ from .models import (
BookedWorkshop, ProposeWorkshopDate,
Testimonial
)
-from django.template.loader import get_template
-from django.template import RequestContext
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.db import IntegrityError
from django.utils import timezone
-from collections import OrderedDict
-from dateutil.parser import parse
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.views.generic.base import TemplateView
from django.contrib import messages
import datetime as dt
import csv
@@ -45,7 +39,6 @@ __credits__ = ["Mahesh Gudi", "Aditya P.", "Ankit Javalkar",
"Arun KP"]
-
def is_email_checked(user):
if hasattr(user, 'profile'):
return True if user.profile.is_email_verified else False
@@ -188,7 +181,7 @@ def user_register(request):
return render(request, "workshop_app/registration/register.html", {"form": form})
-#This is shown to coordinator for booking workshops
+# This is shown to coordinator for booking workshops
def book(request):
user = request.user
if user.is_authenticated():
@@ -221,7 +214,7 @@ def book(request):
workshop_occurence_list.append(workshop_occurence)
del workshop_occurence
- #Gives you the objects of BookedWorkshop
+ # Gives you the objects of BookedWorkshop
bookedworkshop = BookedWorkshop.objects.all()
if len(bookedworkshop) != 0:
for b in bookedworkshop:
@@ -241,7 +234,7 @@ def book(request):
workshop_occurence_list.remove(a)
del x, y
- #Objects of RequestedWorkshop for that particular coordinator
+ # Objects of RequestedWorkshop for that particular coordinator
rW_obj = RequestedWorkshop.objects.filter(
requested_workshop_coordinator=request.user
)
@@ -253,16 +246,16 @@ def book(request):
del x
- #Show upto 12 Workshops per page
+ # Show upto 12 Workshops per page
paginator = Paginator(workshop_occurence_list, 12)
page = request.GET.get('page')
try:
workshop_occurences = paginator.page(page)
except PageNotAnInteger:
- #If page is not an integer, deliver first page.
+ # If page is not an integer, deliver first page.
workshop_occurences = paginator.page(1)
except EmptyPage:
- #If page is out of range(e.g 999999), deliver last page.
+ # If page is out of range(e.g 999999), deliver last page.
workshop_occurences = paginator.page(paginator.num_pages)
return render(
@@ -683,7 +676,7 @@ def my_workshops(request):
for p in proposed_workshop_pending:
workshops.append(p)
-
+
#Show upto 12 Workshops per page
paginator = Paginator(workshops, 12)
page = request.GET.get('page')
@@ -777,6 +770,7 @@ def propose_workshop(request):
else:
return render(request, 'workshop_app/activation.html')
+
@login_required
def view_profile(request):
""" view instructor and coordinator profile """
@@ -839,7 +833,7 @@ def edit_profile(request):
return render(request, 'workshop_app/edit_profile.html', context)
else:
form = ProfileForm(user=user, instance=profile)
- return render(request, 'workshop_app/edit_profile.html', {'form':form})
+ return render(request, 'workshop_app/edit_profile.html', {'form': form})
@login_required
@@ -882,6 +876,7 @@ def view_workshoptype_details(request, workshoptype_id):
{'workshoptype': view_workshoptype_details}
)
+
def view_workshoptype_list(request):
'''Gives the details for types of workshops.'''
user = request.user
@@ -911,12 +906,15 @@ def view_workshoptype_list(request):
def benefits(request):
return render(request, 'workshop_app/view_benefits.html')
+
def faq(request):
return render(request, 'workshop_app/view_faq.html')
+
def how_to_participate(request):
return render(request, 'workshop_app/how_to_participate.html')
+
def file_view(request, workshop_title):
if workshop_title =='flowchart':
return render(request, 'workshop_app/how_to_participate.html')
@@ -982,7 +980,7 @@ def workshop_stats(request):
proposed_workshop_date__month=str(x+1),
status='ACCEPTED').count()
- #Count Total Number of workshops for each type
+ # Count Total Number of workshops for each type
workshop_titles = WorkshopType.objects.all()
workshoptype_dict = {}
for title in workshop_titles:
@@ -1007,7 +1005,7 @@ def workshop_stats(request):
workshoptype_count = [workshoptype_title, workshoptype_num]
del workshoptype_title, workshoptype_num
- #For India Map
+ # For India Map
states = [
['Code', 'State', 'Number'],
["IN-AP", "Andhra Pradesh", 0],
@@ -1200,19 +1198,5 @@ def workshop_stats(request):
return redirect('/manage/')
-@login_required
-def share_details(request):
- user = request.user
- if is_superuser(user):
- return redirect("/admin")
- if is_instructor(user):
- return redirect('/manage/')
- else:
- if request.method == 'POST':
- email_list = (request.POST.get('email').split(','))
- send_email(request, call_on='ShareMail', other_email=email_list)
- return redirect('/view_workshoptype_list/')
-
-
def self_workshop(request):
return render(request, "workshop_app/self_workshop.html")