summaryrefslogtreecommitdiff
path: root/workshop_app
diff options
context:
space:
mode:
Diffstat (limited to 'workshop_app')
-rw-r--r--workshop_app/admin.py5
-rwxr-xr-xworkshop_app/data/Basic Python Schedule.pdfbin0 -> 55260 bytes
-rwxr-xr-xworkshop_app/data/ISCP schedule.pdf (renamed from workshop_app/data/schedule.pdf)bin32900 -> 32900 bytes
-rw-r--r--workshop_app/forms.py68
-rw-r--r--workshop_app/models.py35
-rw-r--r--workshop_app/send_mails.py25
-rw-r--r--workshop_app/static/workshop_app/css/faq.css3
-rw-r--r--workshop_app/static/workshop_app/css/index.css89
-rw-r--r--workshop_app/static/workshop_app/css/testimonials.css50
-rw-r--r--workshop_app/templates/workshop_app/activation.html16
-rw-r--r--workshop_app/templates/workshop_app/booking.html37
-rw-r--r--workshop_app/templates/workshop_app/create_workshop.html3
-rw-r--r--workshop_app/templates/workshop_app/edit_profile.html15
-rw-r--r--workshop_app/templates/workshop_app/how_to_participate.html24
-rw-r--r--workshop_app/templates/workshop_app/index.html227
-rw-r--r--workshop_app/templates/workshop_app/login.html2
-rw-r--r--workshop_app/templates/workshop_app/logout.html2
-rw-r--r--workshop_app/templates/workshop_app/manage.html5
-rw-r--r--workshop_app/templates/workshop_app/my_workshops.html12
-rw-r--r--workshop_app/templates/workshop_app/password_change_done.html15
-rw-r--r--workshop_app/templates/workshop_app/password_change_form.html16
-rw-r--r--workshop_app/templates/workshop_app/password_reset_complete.html6
-rw-r--r--workshop_app/templates/workshop_app/password_reset_confirm.html15
-rw-r--r--workshop_app/templates/workshop_app/password_reset_done.html3
-rw-r--r--workshop_app/templates/workshop_app/password_reset_form.html10
-rw-r--r--workshop_app/templates/workshop_app/profile_updated.html21
-rw-r--r--workshop_app/templates/workshop_app/propose_workshop.html18
-rw-r--r--workshop_app/templates/workshop_app/register.html13
-rw-r--r--workshop_app/templates/workshop_app/testimonals.html74
-rw-r--r--workshop_app/templates/workshop_app/view_benefits.html28
-rw-r--r--workshop_app/templates/workshop_app/view_faq.html20
-rw-r--r--workshop_app/templates/workshop_app/view_profile.html12
-rw-r--r--workshop_app/templates/workshop_app/view_workshoptype_details.html45
-rw-r--r--workshop_app/templates/workshop_app/view_workshoptype_list.html28
-rw-r--r--workshop_app/tests/test_views.py16
-rw-r--r--workshop_app/urls.py3
-rw-r--r--workshop_app/urls_password_reset.py20
-rw-r--r--workshop_app/views.py72
38 files changed, 740 insertions, 313 deletions
diff --git a/workshop_app/admin.py b/workshop_app/admin.py
index 2f8017a..1e2861b 100644
--- a/workshop_app/admin.py
+++ b/workshop_app/admin.py
@@ -2,7 +2,8 @@ from django.contrib import admin
from .models import (
Profile, WorkshopType,
Workshop, ProposeWorkshopDate,
- RequestedWorkshop)
+ RequestedWorkshop, BookedWorkshop,
+ Testimonial)
# Register your models here.
admin.site.register(Profile)
@@ -10,3 +11,5 @@ admin.site.register(WorkshopType)
admin.site.register(Workshop)
admin.site.register(ProposeWorkshopDate)
admin.site.register(RequestedWorkshop)
+admin.site.register(BookedWorkshop)
+admin.site.register(Testimonial)
diff --git a/workshop_app/data/Basic Python Schedule.pdf b/workshop_app/data/Basic Python Schedule.pdf
new file mode 100755
index 0000000..00401d0
--- /dev/null
+++ b/workshop_app/data/Basic Python Schedule.pdf
Binary files differ
diff --git a/workshop_app/data/schedule.pdf b/workshop_app/data/ISCP schedule.pdf
index 203f5e0..203f5e0 100755
--- a/workshop_app/data/schedule.pdf
+++ b/workshop_app/data/ISCP schedule.pdf
Binary files differ
diff --git a/workshop_app/forms.py b/workshop_app/forms.py
index 5113095..ec6db80 100644
--- a/workshop_app/forms.py
+++ b/workshop_app/forms.py
@@ -1,3 +1,4 @@
+
from django import forms
from django.utils import timezone
from .models import (
@@ -23,13 +24,28 @@ position_choices = (
("instructor", "Instructor")
)
+department_choices = (
+ ("computer", "Computer Science"),
+ ("information technology", "Information Technology"),
+ ("civil engineering", "Civil Engineering"),
+ ("electrical engineering", "Electrical Engineering"),
+ ("mechanical engineering", "Mechanical Engineering"),
+ ("chemical engineering", "Chemical Engineering"),
+ ("aerospace engineering", "Aerospace Engineering"),
+ ("biosciences and bioengineering", "Biosciences and BioEngineering"),
+ ("electronics", "Electronics"),
+ ("energy science and engineering", "Energy Science and Engineering"),
+ ("others", "Others"),
+ )
+
class UserRegistrationForm(forms.Form):
"""A Class to create new form for User's Registration.
It has the various fields and functions required to register
a new user to the system"""
required_css_class = 'required'
+ errorlist_css_class = 'errorlist'
username = forms.CharField(max_length=32, help_text='''Letters, digits,
- period only.''')
+ period and underscore only.''')
email = forms.EmailField()
password = forms.CharField(max_length=32, widget=forms.PasswordInput())
confirm_password = forms.CharField\
@@ -39,16 +55,18 @@ class UserRegistrationForm(forms.Form):
phone_number = forms.RegexField(regex=r'^\+?1?\d{9,15}$',
error_message=("Phone number must be entered \
in the format: '+999999999'.\
- Up to 15 digits allowed."))
+ Up to 10 digits allowed."))
institute = forms.CharField(max_length=128,
- help_text='Institute/Organization')
- department = forms.CharField(max_length=64, help_text='Department you work/\
- study')
- position = forms.ChoiceField(help_text='Select Coordinator if you want to organise a workshop\
- in your college/school. <br> Select Instructor if you want to conduct\
- a workshop.',
- choices=position_choices
- )
+ help_text='Please write full name of your Institute/Organization')
+ department = forms.ChoiceField(help_text='Department you work/study',
+ choices=department_choices)
+
+ # Activate when instructor Registration Starts
+ # position = forms.ChoiceField(help_text='Select Coordinator if you want to organise a workshop\
+ # in your college/school. <br> Select Instructor if you want to conduct\
+ # a workshop.',
+ # choices=position_choices
+ # )
def clean_username(self):
u_name = self.cleaned_data["username"]
@@ -77,11 +95,11 @@ class UserRegistrationForm(forms.Form):
return c_pwd
- # def clean_email(self):
- # user_email = self.cleaned_data['email']
- # if User.objects.filter(email=user_email).exists():
- # raise forms.ValidationError("This email already exists")
- # return user_email
+ def clean_email(self):
+ user_email = self.cleaned_data['email']
+ if User.objects.filter(email=user_email).exists():
+ raise forms.ValidationError("This email already exists")
+ return user_email
def save(self):
u_name = self.cleaned_data["username"]
@@ -97,11 +115,11 @@ class UserRegistrationForm(forms.Form):
new_profile = Profile(user=new_user)
new_profile.institute = cleaned_data["institute"]
new_profile.department = cleaned_data["department"]
- new_profile.position = cleaned_data["position"]
+ #new_profile.position = cleaned_data["position"]
new_profile.phone_number = cleaned_data["phone_number"]
new_profile.activation_key = generate_activation_key(new_user.username)
new_profile.key_expiry_time = timezone.now() + \
- timezone.timedelta(days=3)
+ timezone.timedelta(days=1)
new_profile.save()
key = Profile.objects.get(user=new_user).activation_key
return u_name, pwd, key
@@ -109,8 +127,11 @@ class UserRegistrationForm(forms.Form):
class UserLoginForm(forms.Form):
"""Creates a form which will allow the user to log into the system."""
- username = forms.CharField(max_length=32)
- password = forms.CharField(max_length=32, widget=forms.PasswordInput())
+ username = forms.CharField(max_length=32,
+ widget=forms.TextInput(attrs={'placeholder': 'your username'}))
+
+ password = forms.CharField(max_length=32,
+ widget=forms.PasswordInput(attrs={'placeholder': 'your password'}))
def clean(self):
super(UserLoginForm, self).clean()
@@ -163,7 +184,7 @@ class ProposeWorkshopDateForm(forms.ModelForm):
"""
Coordinators will propose a workshop and date
"""
-
+ errorlist_css_class = 'errorlist'
def __init__( self, *args, **kwargs ):
kwargs.setdefault('label_suffix', '')
super(ProposeWorkshopDateForm, self).__init__(*args, **kwargs)
@@ -173,11 +194,14 @@ class ProposeWorkshopDateForm(forms.ModelForm):
self.fields['condition_two'].required = True
self.fields['condition_three'].label = ""
self.fields['condition_three'].required = True
+ self.fields['proposed_workshop_title'].label = "Workshop :"
+ self.fields['proposed_workshop_date'].label = "Workshop Date :"
+
class Meta:
model = ProposeWorkshopDate
- fields = ['condition_one','condition_two','condition_three',
- 'proposed_workshop_title', 'proposed_workshop_date']
+ fields = ['proposed_workshop_title', 'proposed_workshop_date',
+ 'condition_two','condition_three','condition_one']
widgets = {
'proposed_workshop_date': forms.DateInput(attrs={
'class':'datepicker'}),
diff --git a/workshop_app/models.py b/workshop_app/models.py
index 70a22ee..4c5942f 100644
--- a/workshop_app/models.py
+++ b/workshop_app/models.py
@@ -9,6 +9,19 @@ position_choices = (
("instructor", "Instructor")
)
+department_choices = (
+ ("computer", "Computer Science"),
+ ("information technology", "Information Technology"),
+ ("civil engineering", "Civil Engineering"),
+ ("electrical engineering", "Electrical Engineering"),
+ ("mechanical engineering", "Mechanical Engineering"),
+ ("chemical engineering", "Chemical Engineering"),
+ ("aerospace engineering", "Aerospace Engineering"),
+ ("biosciences and bioengineering", "Biosciences and BioEngineering"),
+ ("electronics", "Electronics"),
+ ("energy science and engineering", "Energy Science and Engineering"),
+ ("others", "Others"),
+ )
def has_profile(user):
""" check if user has profile """
@@ -19,7 +32,7 @@ class Profile(models.Model):
user = models.OneToOneField(User)
institute = models.CharField(max_length=150)
- department = models.CharField(max_length=150)
+ department = models.CharField(max_length=150, choices=department_choices)
phone_number = models.CharField(
max_length=15,
validators=[RegexValidator(
@@ -30,6 +43,7 @@ class Profile(models.Model):
)]
,null=False)
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\
a workshop.')
@@ -114,7 +128,7 @@ class ProposeWorkshopDate(models.Model):
minimum 50 participants for the workshop.')
condition_two = models.BooleanField(default=False, help_text='I agree \
that this booking won\'t be cancelled without \
- 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.')
@@ -144,3 +158,20 @@ class BookedWorkshop(models.Model):
booked_workshop_requested = models.ForeignKey(RequestedWorkshop, null=True)
booked_workshop_proposed = models.ForeignKey(ProposeWorkshopDate, null=True)
+
+class Testimonial(models.Model):
+ """
+ Contains Testimonals of Workshops
+ """
+
+ name = models.CharField(max_length=150)
+ institute = models.CharField(max_length=255)
+ department = models.CharField(max_length=150)
+ message = models.TextField()
+
+ def __str__(self):
+ return u"{0} | {1} ".format(
+ self.name,
+ self.institute,
+ self.department
+ )
diff --git a/workshop_app/send_mails.py b/workshop_app/send_mails.py
index 9c3e732..7eb5fff 100644
--- a/workshop_app/send_mails.py
+++ b/workshop_app/send_mails.py
@@ -27,6 +27,7 @@ from email.mime.multipart import MIMEMultipart
from email.mime.text import MIMEText
from email.mime.base import MIMEBase
from email import encoders
+from time import sleep
def generate_activation_key(username):
"""Generates hashed secret key for email activation"""
@@ -55,7 +56,6 @@ def send_smtp_email(request=None, subject=None, message=None,
from os import listdir, path
files = listdir(settings.MEDIA_ROOT)
for f in files:
- print(path.join(settings.MEDIA_ROOT,f))
attachment = open(path.join(settings.MEDIA_ROOT,f), 'rb')
part = MIMEBase('application', 'octet-stream')
part.set_payload((attachment).read())
@@ -137,7 +137,6 @@ def send_email( request, call_on,
message = dedent("""\
Thank you for registering as a coordinator with us.
- Your request as a coordinator has been accepted.
Please click on the below link to
activate your account
{0}/activate_user/{1}
@@ -151,7 +150,7 @@ def send_email( request, call_on,
try:
send_mail(
"Coordinator Registration at FOSSEE, IIT Bombay", message, SENDER_EMAIL,
- [request.user.email], fail_silently=False
+ [request.user.email, 'workshops@fossee.in'], fail_silently=False
)
except Exception:
send_smtp_email(request=request,
@@ -201,6 +200,9 @@ def send_email( request, call_on,
approval/disapproval. You will be notified about the status
via email and on {2}/my_workshops/
+ Please Note: Unless you get a confirmation email for this workshop with
+ the list of instructions, your workshop shall be in the waiting list.
+
In case of queries regarding workshop booking(s), revert
to this email.""".format(
workshop_date, workshop_title, PRODUCTION_URL
@@ -240,12 +242,17 @@ def send_email( request, call_on,
files = listdir(settings.MEDIA_ROOT)
for f in files:
- attachment = open(path.join(settings.MEDIA_ROOT,f), 'rb')
- part = MIMEBase('application', 'octet-stream')
- part.set_payload((attachment).read())
- encoders.encode_base64(part)
- part.add_header('Content-Disposition', "attachment; filename= %s " % f)
- msg.attach(part)
+ print(f, workshop_title)
+ if f == workshop_title+' schedule.pdf' or \
+ f == 'instructions-for-coordinators.pdf' or \
+ f == 'instructions-for-participants.pdf':
+ attachment = open(path.join(settings.MEDIA_ROOT,f), 'rb')
+ part = MIMEBase('application', 'octet-stream')
+ part.set_payload((attachment).read())
+ encoders.encode_base64(part)
+ part.add_header('Content-Disposition', "attachment; filename= %s " % f)
+ msg.attach(part)
+ sleep(1)
msg.send()
else:
diff --git a/workshop_app/static/workshop_app/css/faq.css b/workshop_app/static/workshop_app/css/faq.css
index 98b4f5c..ac010b9 100644
--- a/workshop_app/static/workshop_app/css/faq.css
+++ b/workshop_app/static/workshop_app/css/faq.css
@@ -2,4 +2,7 @@
list-style-type: square;
font-family: 'Antic Slab';
font-size: 22px;
+ border-bottom: 1.5px solid #BDBDBD;
}
+
+
diff --git a/workshop_app/static/workshop_app/css/index.css b/workshop_app/static/workshop_app/css/index.css
index 1087d24..9590473 100644
--- a/workshop_app/static/workshop_app/css/index.css
+++ b/workshop_app/static/workshop_app/css/index.css
@@ -3,92 +3,79 @@ body {
background-color: grey;
}
+.container {
+ background-color: #C8C5B6;
+ width: 90%;
+}
+
.fossee-label {
- padding-top: 20%;
- margin-left: 9%;
color: #6D5847;
+ text-align: center;
font-size: 400%;
-}
-
-.logo {
- float: left;
- margin-top: 9%;
- margin-left: 15%;
+ margin-top: 12%;
}
.label-bar {
color: #6D5847;
- float: right;
margin-top: 9%;
font-size: 120%;
- margin-right: 3%;
+ background-color: white;
+ text-align:right;
+
}
+.label-bar a {
+ color: #6D5847;
+}
.login {
- margin-left: auto;
- margin-right: 1%;
- width: 40%;
- height: 90%;
- background: white;
+
+}
+
+#first-right {
+ background-color: white;
+ width:90%;
+ margin: auto;
+ padding: 5%;
+ text-align: center;
}
#rectbox {
- border-radius: 9%;
+ border-radius: 15px 15px 15px 15px;
background: #6D5847;
- padding: 3%;
- margin-left: 10%;
+ margin-left: 15%;
margin-top: 3%;
width: 75%;
- height: 60%;
-}
+ height: 60%;
+ padding-top: 8%;
+ padding-bottom: 8%;
+}
/* Icons with their respective Images */
.icons {
background: white;
margin-top: 3%;
+ padding-top: 2%;
+ font-size: 15pt;
+ color: #6D5847;
}
-figure.item {
- /* To correctly align image, regardless of content height: */
- vertical-align: top;
- display: inline-block;
- /* To horizontally center images and caption */
- text-align: center;
- /* The width of the container also implies margin around the images. */
+.icons a {
+ color: #6D5847;
}
-
-
-
-
-/* Contact Us, Related Links and Organization Logo css*/
-
-
-.org-logo {
- margin-top: 1%;
-
- float: left;
- color: #5A3700;
-
+label {
+ color:white !important;
}
-.related-links {
- font-size: 120%;
- color: #5A3700;
- text-align: center;
- margin-top: 1%;
-}
-.contact-us {
- font-size: 140%;
- color: #5A3700;
- margin-top: 1%;
+/* Contact Us, Related Links and Organization Logo css*/
- float: right;
+#bottom a{
+ color: #6D5847;
}
/* Footer */
diff --git a/workshop_app/static/workshop_app/css/testimonials.css b/workshop_app/static/workshop_app/css/testimonials.css
new file mode 100644
index 0000000..cba4902
--- /dev/null
+++ b/workshop_app/static/workshop_app/css/testimonials.css
@@ -0,0 +1,50 @@
+/***
+User Profile Sidebar by @keenthemes
+A component of Metronic Theme - #1 Selling Bootstrap 3 Admin Theme in Themeforest: http://j.mp/metronictheme
+Licensed under MIT
+***/
+
+/* Content */
+.content {
+ padding-top: 30px;
+}
+
+/* Testimonials */
+.testimonials blockquote {
+ background: #f8f8f8 none repeat scroll 0 0;
+ border-bottom:1px dotted black;
+ color: #666;
+ display: block;
+ font-size: 15px;
+ line-height: 20px;
+ padding: 15px;
+ position: relative;
+}
+
+
+.testimonials .carousel-info img {
+ border: 1px solid #f5f5f5;
+ border-radius: 150px !important;
+ padding: 3px;
+ width: 75px;
+}
+.testimonials .carousel-info {
+ overflow: hidden;
+}
+.testimonials .carousel-info img {
+ margin-right: 15px;
+}
+.testimonials .carousel-info span {
+ display: block;
+}
+.testimonials span.testimonials-name {
+ color: #e6400c;
+ font-size: 21px;
+ font-weight: 300;
+ margin: 23px 0 7px;
+}
+.testimonials span.testimonials-post {
+ color: #656565;
+ font-size: 15px;
+ border-bottom: 1px solid grey;
+} \ No newline at end of file
diff --git a/workshop_app/templates/workshop_app/activation.html b/workshop_app/templates/workshop_app/activation.html
index 88bada9..262ceae 100644
--- a/workshop_app/templates/workshop_app/activation.html
+++ b/workshop_app/templates/workshop_app/activation.html
@@ -8,7 +8,7 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="#">SiteName</a>
+ <a class="navbar-brand" href="#">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
{% if request.user.profile.is_email_verified %}
@@ -20,6 +20,17 @@
</nav>
{% endblock %}
+{% block extra %}
+
+ <script type="text/javascript">
+ window.setTimeout(function()
+ {
+ location.href="{{ URL_ROOT }}/logout/"
+ }, 5000);
+ </script>
+
+{% endblock %}
+
{% block content %}
{% if status == '2' %}
<div class="container">
@@ -32,7 +43,6 @@
<div class="container">
<div class="jumbotron">
<p> Your activation has expired please register again</p>
-
</div>
</div>
{% elif status == '0' %}
@@ -46,7 +56,7 @@
<div class="container">
<div class="jumbotron">
<h1>Activation Awaiting</h1>
- <p>Please <strong>Logout</strong> and check your email to activate your account. The key expires in <strong>3days</strong> from the date of registeration</p>
+ <p>Please <strong>Logout</strong> and check your email to activate your account. The key expires in <strong>24hours</strong> from the date of registeration</p>
</div>
</div>
{% endif %}
diff --git a/workshop_app/templates/workshop_app/booking.html b/workshop_app/templates/workshop_app/booking.html
index 13af37c..64ecee1 100644
--- a/workshop_app/templates/workshop_app/booking.html
+++ b/workshop_app/templates/workshop_app/booking.html
@@ -37,9 +37,9 @@
var $dialog = $('<div></div').html(
'<form id="myform" action="">\
<input type="checkbox" id="one"\
- name="one" value="one"/> I will give minimum 50 participants for the workshop.<br/>\
- <input type="checkbox" id="two" name="two" value="two" /> I agree that this booking won\'t be cancelled without prior notice to the instructor and fossee.<br/>\
- <input type="checkbox" id="three" name="three" value="three"/> I am '+ check_count +' in the queue.\
+ name="one" value="one"/> We assure to give minimum 50 participants for the workshop.<br/>\
+ <input type="checkbox" id="two" name="two" value="two" /> We agree that this booking won\'t be cancelled without prior notice of 2days to the instructor and fossee.<br/>\
+ <input type="checkbox" id="three" name="three" value="three"/> Your request will be number '+ check_count +' in the queue.\
</form> ')
.dialog({
autoOpen: false,
@@ -85,13 +85,16 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
- <div class="navbar-header">
- <a class="navbar-brand" href="#">Coordinator Profile</a>
+ <div class="navbar-header" class="active">
+ <a class="navbar-brand" href="{{ URL_ROOT}}/book/">Home</a>
</div>
<ul class="nav navbar-nav">
- <li class="active"><a href="{{ URL_ROOT}}/book/">Book</a></li>
<li><a href="{{ URL_ROOT}}/my_workshops/">My Workshops</a></li>
<li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
+ <li><a href="{{ URL_ROOT }}/faq/">FAQ's</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> Profile </a></li>
@@ -102,7 +105,7 @@
{% endblock %}
{% block content %}
- <h4 align="center">This is the list of events available, if you haved booked a workshop please goto My Workshops and check your workshop status.</h4>
+ <h3 align="center">List of Available Workshops </h3>
<br>
<div class="container">
<table class="table table-hover ">
@@ -121,27 +124,13 @@
<tr >
<td id="instructor-name">{{ workshop.1 }}</td>
- <td class="accordion-toggle" data-toggle="collapse" href="#collapseOne{{ forloop.counter }}"
- id="workshop-name">{{ workshop.2 }}<a href="#">
+ <td
+ id="workshop-name">{{ workshop.2 }} <a href="{{URL_ROOT}}/pdf_view/{{workshop.2.workshoptype_name}}" >
<span class="glyphicon glyphicon-info-sign"></span>
- </a></td>
+ </a> </td>
<td id="workshop-date{{ forloop.counter }}">{{ workshop.0 }}</td>
<td><button class="btn btn-primary btn-sm" id="book-btn" onClick="sendData('{{workshop.0}},{{workshop.3}},{{workshop.4}}')" > Book</button></td>
</tr>
-
- <tr>
- <td colspan="12" class="hiddenRow">
- <div id="collapseOne{{ forloop.counter }}" class="accordion-body collapse">
- <table class="table table-striped">
- <tbody>
- <tr>
- <td>{{ workshop.5|safe }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- </tr>
</tbody>
{% endfor %}
</table>
diff --git a/workshop_app/templates/workshop_app/create_workshop.html b/workshop_app/templates/workshop_app/create_workshop.html
index 8b4d4d1..7d9059d 100644
--- a/workshop_app/templates/workshop_app/create_workshop.html
+++ b/workshop_app/templates/workshop_app/create_workshop.html
@@ -15,10 +15,9 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="#">Instructor Profile</a>
+ <a class="navbar-brand" href="{{URL_ROOT}}/manage/">Home</a>
</div>
<ul class="nav navbar-nav">
- <li ><a href="{{ URL_ROOT }}/manage/">Manage</a></li>
<li class="active"><a href="{{ URL_ROOT }}/create_workshop/">Create Workshop</a></li>
<li ><a href="{{ URL_ROOT }}/view_workshoptype_list/">View Workshop List</a></li>
<li ><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
diff --git a/workshop_app/templates/workshop_app/edit_profile.html b/workshop_app/templates/workshop_app/edit_profile.html
index 2c7aea3..d9a39e1 100644
--- a/workshop_app/templates/workshop_app/edit_profile.html
+++ b/workshop_app/templates/workshop_app/edit_profile.html
@@ -7,21 +7,26 @@
{% block header %}
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
+ {% if request.user.profile.position == 'instructor' %}
<div class="navbar-header">
- <a class="navbar-brand" href="#">Booking</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/manage/">Home</a>
</div>
- {% if request.user.profile.position == 'instructor' %}
<ul class="nav navbar-nav">
- <li><a href="{{ URL_ROOT }}/manage/">Manage</a></li>
<li><a href="{{ URL_ROOT }}/create_workshop/">Create Workshop</a></li>
- <li><a href="{{ URL_ROOT }}/view_workshoptype_list/">View Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_list/">Workshop List</a></li>
<li><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
</ul>
{% else %}
+ <div class="navbar-header">
+ <a class="navbar-brand" href="{{ URL_ROOT }}/book/">Home</a>
+ </div>
<ul class="nav navbar-nav">
- <li><a href="{{ URL_ROOT }}/book/">Book</a></li>
<li><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
<li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
+ <li><a href="{{ URL_ROOT }}/faq/"> FAQ's</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
</ul>
{% endif %}
<ul class="nav navbar-nav navbar-right">
diff --git a/workshop_app/templates/workshop_app/how_to_participate.html b/workshop_app/templates/workshop_app/how_to_participate.html
index c732a7f..23b56ba 100644
--- a/workshop_app/templates/workshop_app/how_to_participate.html
+++ b/workshop_app/templates/workshop_app/how_to_participate.html
@@ -15,21 +15,39 @@
{% block header %}
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
+ {% if request.user.profile.position == 'coordinator' %}
+ <div class="navbar-header">
+ <a class="navbar-brand" href="{{ URL_ROOT}}/book/">Home</a>
+ </div>
+ <ul class="nav navbar-nav">
+ <li><a href="{{ URL_ROOT}}/my_workshops/">My Workshops</a></li>
+ <li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
+ <li><a href="{{ URL_ROOT }}/faq/">FAQ</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li class="active"><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> Profile </a></li>
+ <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
+ </ul>
+ {% else %}
<div class="navbar-header">
- <a class="navbar-brand" href="{{URL_ROOT}}/">Booking</a>
+ <a class="navbar-brand" href="{{URL_ROOT}}/">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/register/"><span class="glyphicon glyphicon-user"></span> Register</a></li>
<li><a href="{{ URL_ROOT }}/login/"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
+ {% endif %}
</div>
</nav>
{% endblock %}
{% block content %}
- <div class="container-fluid" style="margin-left:auto;">
- <img src="{{ URL_ROOT }}/static/workshop_app/img/img2.jpg">
+ <div class="container-fluid text-center" >
+ <img src="{{ URL_ROOT }}/static/workshop_app/img/img2.jpg">
</div>
{% endblock %} \ No newline at end of file
diff --git a/workshop_app/templates/workshop_app/index.html b/workshop_app/templates/workshop_app/index.html
index d8c1232..a805ed4 100644
--- a/workshop_app/templates/workshop_app/index.html
+++ b/workshop_app/templates/workshop_app/index.html
@@ -1,120 +1,147 @@
+
<!DOCTYPE html>
-<html>
- <head>
- <title>Welcome</title>
- </head>
+<html lang="en">
+
+<head>
+
+ <meta charset="utf-8">
+ <meta http-equiv="X-UA-Compatible" content="IE=edge">
+ <meta name="viewport" content="width=device-width, initial-scale=1">
+ <meta name="Akshen Doke" content="">
+
+ <title>Welcome</title>
+
+ <!-- Bootstrap Core CSS -->
+ <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+
+ <!-- Custom CSS -->
+ <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/index.css" type="text/css" />
- <!-- Bootstrap CDN -->
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
+ <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
+ <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
+ <!--[if lt IE 9]>
+ <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
+ <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
+ <![endif]-->
- <link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js">
+</head>
- <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/index.css" type="text/css" />
- <body>
- <div class="container" style="width: 90%; height:90%;background:#C8C5B6;">
- <div class="row">
+<body>
+
+ <!-- Navigation -->
+
- <div class="col-md-4">
- <div class="fossee-label">FOSSEE Workshop</div>
- <div class="logo">
- <img src="{{ URL_ROOT }}/static/workshop_app/img/python_logo.png" >
- </div>
+ <div class="container">
+
+ <!-- Heading Row -->
+ <div class="row">
+ <div class="col-md-5 fossee-label">
+ FOSSEE <br>Workshops
+
+ </div>
+ <div class="login col-md-7">
+ <div id="first-right">
+ <div class="label-bar">
+ <a href="http://python.fossee.in/about/"
+ target="_blank" >About </a>|<a href="{{ URL_ROOT }}/testimonials/"> Testimonials </a>| <a href="http://python.fossee.in/" target="_blank" > Past Workshops</a>
</div>
-
- <div class="login col-md-8">
- <div class="label-bar"><a href="http://python.fossee.in/about/"
- target="_blank" style="color: #6D5847;">About </a>|<a href="" style="color: #6D5847;">Blog </a>| <a href="http://python.fossee.in/gallery/" target="_blank" style="color: #6D5847;">Gallery</a></div>
- <img src=" {{ URL_ROOT }}/static/workshop_app/img/img_1.png" style="margin-left: 40%;padding-top: 25%;"><br>
+ <br> <br>
+ <img src=" {{ URL_ROOT }}/static/workshop_app/img/img_1.png" ><br>
<div id="rectbox">
<form method="post">
{% csrf_token %}
{{ form.as_p }}
- <button class="btn btn-default btn-sm" style="margin-left: 35%;" type="submit">Login</button>
- <br>
+ <button class="btn btn-default btn-sm" type="submit">Login</button>
+ <a href="{{URL_ROOT}}/forgotpassword/" class="btn btn-default btn-sm" >Forgot Password</a>
</form>
</div>
-
- <h4 style="margin-left: 27%; color: grey;">If not Registered yet, <br> please <a href="{{ URL_ROOT}}/register/" target="_blank">register here.</a></h4>
+ <br>
+ <p style="font-size: 15pt;">If not registered yet, <br> please <a href="{{ URL_ROOT}}/register/" >register here.</a></p>
<br><br>
-
- </div>
-
- </div>
-
- <div class="row">
- <div class="icons col-sm-12">
-
- <figure class="item" style="margin-left: 10%;">
- <a href="{{ URL_ROOT }}/view_workshoptype_details/" style="color: #6D5847;">
- <img class="caption-img" src="{{ URL_ROOT }}/static/workshop_app/img/list.png" >
- <figcaption class="caption">Course List</figcaption>
- </a>
- </figure>
-
- <figure class="item" style="margin-left: 15%;">
- <a href="{{ URL_ROOT }}/benefits/" style="color: #6D5847;">
- <img class="caption-img" src="{{ URL_ROOT }}/static/workshop_app/img/bnft.png" >
- <figcaption class="caption" >Benefits</figcaption>
- </a>
- </figure>
-
- <figure class="item" style="margin-left: 15%;">
- <a href="{{ URL_ROOT }}/faq/" style="color: #6D5847;">
- <img class="caption-img" src="{{ URL_ROOT }}/static/workshop_app/img/faq.png" >
- <figcaption class="caption" >FAQs</figcaption>
- </a>
- </figure>
-
- <figure class="item" style="margin-left: 15%; ">
- <a href="{{ URL_ROOT }}/how_to_participate/" style="color: #6D5847;">
- <img class="caption-img" src="{{ URL_ROOT }}/static/workshop_app/img/part.png" >
- <figcaption class="caption">How to Participate</figcaption>
- </a>
- </figure>
-
- </div>
- </div>
-
- <!-- Bottom 3 cols -->
- <div class="row">
- <!-- Logo -->
- <div class="org-logo col-sm-4">
- <span >Organized By:</span><br>
- <img src="{{ URL_ROOT }}/static/workshop_app/img/fossee_logo.png">
-
- <img src="{{ URL_ROOT }}/static/workshop_app/img/iitb_logo.png" >
- <br>
- </div>
-
- <!-- Related Links -->
- <div class="related-links col-sm-4">
- Related Links<br>
- <a href="http://fossee.in" target="_blank" >fossee.in</a><br>
- <a href="http://yaksh.fossee.in" target="_blank" >yaksh.fossee.in</a><br>
- <a href="http://python.fossee.in" target="_blank" >python.fossee.in</a>
- </div>
-
- <!-- Contact Us -->
- <div class="contact-us col-sm-4">
- Contact Us:<br>
- FOSSEE, IIT-Bombay<br>
- Mumbai, India<br>
+ </div>
+ </div>
+ <!-- /.col-md-4 -->
+ </div>
+ <!-- /.row -->
+
+ <!-- Call to Action Well -->
+ <div class="row icons" style="align-items: center;">
+ <div class="text-center">
+ <div class="col-md-3" style="align-items: center;">
+ <a href="{{ URL_ROOT }}/faq/"><img src="{{ URL_ROOT}}/static/workshop_app/img/faq.png"><br><br>
+ FAQ's</a>
+ <br><br>
+ </div>
+ <div class="col-md-3" style="align-items: center;">
+ <a href="{{ URL_ROOT }}/how_to_participate/" >
+ <img src="{{ URL_ROOT}}/static/workshop_app/img/part.png"><br><br>
+ How to Participate</a>
+ <br><br>
+ </div>
+ <div class="col-md-3">
+ <a href="{{ URL_ROOT }}/benefits/">
+ <img src="{{ URL_ROOT}}/static/workshop_app/img/bnft.png"><br><br>
+ Benefits</a>
+ <br><br>
+ </div>
+ <div class="col-md-3">
+ <a href="{{ URL_ROOT }}/view_workshoptype_details/">
+ <img src="{{ URL_ROOT}}/static/workshop_app/img/list.png"><br><br>
+ Workshops List</a>
+ <br><br>
+ </div>
+ <!-- /.col-lg-12 -->
+ </div>
+ </div>
+ <!-- /.row -->
+
+ <!-- Content Row -->
+ <div class="row" id="bottom">
+ <div class="col-md-4">
+ <br><br>
+ <h4>Organized By:</h4>
+ <img src="{{ URL_ROOT}}/static/workshop_app/img/fossee_logo.png">
+ &nbsp; &nbsp;
+ <img src="{{ URL_ROOT}}/static/workshop_app/img/iitb_logo.png">
+ </div>
+ <!-- /.col-md-4 -->
+ <div class="col-md-4">
+ <br>
+ <h3>Related Links</h3>
+ <a href="http://fossee.in" target="_blank" >fossee.in</a><br>
+ <a href="http://yaksh.fossee.in" target="_blank" >yaksh.fossee.in</a><br>
+ <a href="http://python.fossee.in" target="_blank" >python.fossee.in</a>
+ </div>
+ <!-- /.col-md-4 -->
+ <div class="col-md-4">
+ <h3>Contact Us</h3>
+ FOSSEE, IIT-Bombay<br>
+ Mumbai, India <br> <br>
- Phone: (+91) 22 2576
- 4133<br>
- Email: workshops[at]fossee[dot]in
- </div>
- </div>
-
+ Phone: (+91) 22 2576 4133<br>
+ Email: workshops[at]fossee[dot]in
+ </div>
+ <!-- /.col-md-4 -->
+ </div>
+ <!-- /.row -->
+
+ <!-- Footer -->
+ <footer>
+ <div class="footer row">
+ <div class="col-lg-12">
+ <img src="" style="height: 40px;" >
+ <img src="{{ URL_ROOT }}/static/workshop_app/img/cc.png" > &nbsp; &nbsp;
+ This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
+ </div>
+ </div>
+ </footer>
- <div class="footer">
- <img src="{{ URL_ROOT }}/static/workshop_app/img/cc.png" style="width:5%;height:3%;">
- This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License
</div>
- </div>
- </body>
+ <!-- /.container -->
+
+</body>
+
</html>
diff --git a/workshop_app/templates/workshop_app/login.html b/workshop_app/templates/workshop_app/login.html
index 47f5827..a659643 100644
--- a/workshop_app/templates/workshop_app/login.html
+++ b/workshop_app/templates/workshop_app/login.html
@@ -8,7 +8,7 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="{{ URL_ROOT }}/">Booking</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
diff --git a/workshop_app/templates/workshop_app/logout.html b/workshop_app/templates/workshop_app/logout.html
index 5dd9587..796bb14 100644
--- a/workshop_app/templates/workshop_app/logout.html
+++ b/workshop_app/templates/workshop_app/logout.html
@@ -8,7 +8,7 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="{{ URL_ROOT }}/">Booking</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
diff --git a/workshop_app/templates/workshop_app/manage.html b/workshop_app/templates/workshop_app/manage.html
index e210e5e..a390c8a 100644
--- a/workshop_app/templates/workshop_app/manage.html
+++ b/workshop_app/templates/workshop_app/manage.html
@@ -4,12 +4,11 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="#">Instructor Profile</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/manage/">Home</a>
</div>
<ul class="nav navbar-nav">
- <li class="active"><a href="{{ URL_ROOT }}/manage/">Manage</a></li>
<li ><a href="{{ URL_ROOT }}/create_workshop/">Create Workshop</a></li>
- <li ><a href="{{ URL_ROOT }}/view_workshoptype_list/">View Workshop List</a></li>
+ <li ><a href="{{ URL_ROOT }}/view_workshoptype_list/"> Workshop List</a></li>
<li ><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
diff --git a/workshop_app/templates/workshop_app/my_workshops.html b/workshop_app/templates/workshop_app/my_workshops.html
index c20a6ca..3ab7387 100644
--- a/workshop_app/templates/workshop_app/my_workshops.html
+++ b/workshop_app/templates/workshop_app/my_workshops.html
@@ -43,22 +43,24 @@
<div class="container-fluid">
{% if request.user.profile.position == 'instructor' %}
<div class="navbar-header">
- <a class="navbar-brand" href="#">Instructor Profile</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/manage/">Home</a>
</div>
<ul class="nav navbar-nav">
- <li><a href="{{ URL_ROOT }}/manage/">Manage</a></li>
<li><a href="{{ URL_ROOT }}/create_workshop/">Create Workshop</a></li>
- <li><a href="{{ URL_ROOT }}/view_workshoptype_list/">View Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_list/">Workshop List</a></li>
<li class="active"><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
</ul>
{% else %}
<div class="navbar-header">
- <a class="navbar-brand" href="{{URL_ROOT}}/book/">Coordinator Profile</a>
+ <a class="navbar-brand" href="{{URL_ROOT}}/book/">Home</a>
</div>
<ul class="nav navbar-nav">
- <li><a href="{{ URL_ROOT }}/book/">Book</a></li>
<li class="active"><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
<li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
+ <li><a href="{{ URL_ROOT }}/faq/">FAQ's</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
</ul>
{% endif %}
diff --git a/workshop_app/templates/workshop_app/password_change_done.html b/workshop_app/templates/workshop_app/password_change_done.html
new file mode 100644
index 0000000..45c8162
--- /dev/null
+++ b/workshop_app/templates/workshop_app/password_change_done.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+
+{% block pagetitle %}Password change successful{% endblock %}
+{% block script %}
+<script type="text/javascript">
+ window.setTimeout(function()
+ {
+ location.href="{{ URL_ROOT }}/login/"
+ }, 2000);
+</script>
+{% endblock %}
+{% block content %}
+<h3>Your password has been changed successfully.</h3>
+<h4>Redirecting ...</h4>
+{% endblock %}
diff --git a/workshop_app/templates/workshop_app/password_change_form.html b/workshop_app/templates/workshop_app/password_change_form.html
new file mode 100644
index 0000000..c5ed81a
--- /dev/null
+++ b/workshop_app/templates/workshop_app/password_change_form.html
@@ -0,0 +1,16 @@
+{% extends "base.html" %}
+<!DOCTYPE html>
+{% block pagetitle %} Change Password {% endblock %}
+
+{% block content %}
+<form action="" method="post" >
+ {% csrf_token %}
+ <center>
+ <table class=span1>
+ {{ form }}
+ </table>
+ </center>
+ <center><button class="btn" type="submit">Change Password</button>
+ <button class="btn" type="button" name="button" onClick='location.replace("{{URL_ROOT}}/login/");'>Cancel</button></center>
+</form>
+{% endblock content %}
diff --git a/workshop_app/templates/workshop_app/password_reset_complete.html b/workshop_app/templates/workshop_app/password_reset_complete.html
new file mode 100644
index 0000000..bf27059
--- /dev/null
+++ b/workshop_app/templates/workshop_app/password_reset_complete.html
@@ -0,0 +1,6 @@
+{% extends "base.html" %}
+{% block pagetitle %}Password reset complete{% endblock %}
+{% block content %}
+<p>Your password has been reset. </p>
+
+{% endblock %}
diff --git a/workshop_app/templates/workshop_app/password_reset_confirm.html b/workshop_app/templates/workshop_app/password_reset_confirm.html
new file mode 100644
index 0000000..1b0a1b7
--- /dev/null
+++ b/workshop_app/templates/workshop_app/password_reset_confirm.html
@@ -0,0 +1,15 @@
+{% extends "base.html" %}
+{% block pagetitle %}Reset Password{% endblock %}
+
+{% block content %}
+ {% if validlink %}
+ <p>Please enter your new password twice so we can verify you typed it in correctly</p>.
+ <form method="post">
+ {% csrf_token %}
+ {{ form.as_p }}
+ <button class= "btn" type="submit">Submit</button>
+ </form>
+ {% else %}
+ <p>This reset link is no longer valid!</p>
+ {% endif %}
+{% endblock %}
diff --git a/workshop_app/templates/workshop_app/password_reset_done.html b/workshop_app/templates/workshop_app/password_reset_done.html
new file mode 100644
index 0000000..1ac7b60
--- /dev/null
+++ b/workshop_app/templates/workshop_app/password_reset_done.html
@@ -0,0 +1,3 @@
+{% extends "base.html" %}
+{% block title %}Password reset successful{% endblock %}
+{% block pagetitle %} Instruction for setting new password has been mailed to your registered email address {% endblock %}
diff --git a/workshop_app/templates/workshop_app/password_reset_form.html b/workshop_app/templates/workshop_app/password_reset_form.html
new file mode 100644
index 0000000..fa14e9e
--- /dev/null
+++ b/workshop_app/templates/workshop_app/password_reset_form.html
@@ -0,0 +1,10 @@
+{% extends "base.html" %}
+{% block pagetitle %} Email will be send to the registered email address {% endblock %}
+{% block content %}
+<form action="" method="post">
+ {% csrf_token %}
+ {{ form }}
+ <button class="btn" type="submit">Request</button>
+ <a class="btn" href="{{URL_ROOT}}/login/">Cancel</a>
+</form>
+{% endblock content %}
diff --git a/workshop_app/templates/workshop_app/profile_updated.html b/workshop_app/templates/workshop_app/profile_updated.html
index c90e176..610770a 100644
--- a/workshop_app/templates/workshop_app/profile_updated.html
+++ b/workshop_app/templates/workshop_app/profile_updated.html
@@ -7,21 +7,28 @@
{% block header %}
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
+ {% if request.user.profile.position == 'instructor' %}
<div class="navbar-header">
- <a class="navbar-brand" href="#">WebSiteName</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/manage/">Home</a>
</div>
<ul class="nav navbar-nav">
- {% if request.user.profile.position == 'instructor' %}
- <li><a href="{{ URL_ROOT }}/manage/">Manage</a>
- </li>
<li><a href="{{ URL_ROOT }}/create_workshop/">Create Workshop</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
+ </ul>
{% else %}
- <li><a href="{{ URL_ROOT }}/book/">Book</a></li>
+ <div class="navbar-header">
+ <a class="navbar-brand" href="{{URL_ROOT}}/book/">Home</a>
+ </div>
+ <ul class="nav navbar-nav">
<li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
- {% endif %}
- <li><a href="{{ URL_ROOT }}/view_workshoptype_list/">View Workshop Details</a></li>
<li><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
+ <li><a href="{{ URL_ROOT }}/faq/"> FAQ's</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
</ul>
+ {% endif %}
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> Profile </a></li>
<li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
diff --git a/workshop_app/templates/workshop_app/propose_workshop.html b/workshop_app/templates/workshop_app/propose_workshop.html
index 697fe63..76f57ce 100644
--- a/workshop_app/templates/workshop_app/propose_workshop.html
+++ b/workshop_app/templates/workshop_app/propose_workshop.html
@@ -11,11 +11,14 @@
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script>
+ var dateToday = new Date();
+ dateToday.setDate(dateToday.getDate() + 2);
$(function() {
$( ".datepicker" ).datepicker({
changeMonth: true,
changeYear: true,
- yearRange: "1994:2049",
+ yearRange: "1994:2084",
+ minDate: dateToday,
// You can put more options here.
});
});
@@ -26,12 +29,15 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="{{ URL_ROOT}}/book/">Coordinator Profile</a>
+ <a class="navbar-brand" href="{{ URL_ROOT}}/book/">Home</a>
</div>
<ul class="nav navbar-nav">
- <li><a href="{{ URL_ROOT }}/book/">Book</a></li>
<li><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
<li class="active"><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
+ <li><a href="{{ URL_ROOT }}/faq/"> FAQ's</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> Profile </a></li>
@@ -42,6 +48,12 @@
{% endblock %}
{% block content %}
+ <style type="text/css">
+ .errorlist {
+ color: red;
+ }
+ </style>
+
<div class="container">
<form method="post">
{% csrf_token %}
diff --git a/workshop_app/templates/workshop_app/register.html b/workshop_app/templates/workshop_app/register.html
index fcb0739..6804ad0 100644
--- a/workshop_app/templates/workshop_app/register.html
+++ b/workshop_app/templates/workshop_app/register.html
@@ -8,7 +8,7 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="{{ URL_ROOT }}/">Booking</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
@@ -27,10 +27,16 @@
content: "*";
color: red;
}
+
+ .errorlist {
+ color: red;
+ }
</style>
<div class="container" >
<br>
+ <h3>Coordinator Registration Form</h3>
+ <br>
<form action="" method="post">
{% csrf_token %}
<table class="table table-bordered">
@@ -39,8 +45,9 @@
<button class="btn btn-primary" type="submit">Register</button>
</form><br>
- <div class="alert alert-info">
+ <!-- Activate when Instructor registeration starts -->
+ <!-- <div class="alert alert-info">
<strong>Info!</strong> Instructors, please wait for our admin approval, if your instructor account is not activated in 7 days, please mail us at workshops[at]fossee[dot]in
- </div>
+ </div> -->
</div>
{% endblock %}
diff --git a/workshop_app/templates/workshop_app/testimonals.html b/workshop_app/templates/workshop_app/testimonals.html
new file mode 100644
index 0000000..e4b7d24
--- /dev/null
+++ b/workshop_app/templates/workshop_app/testimonals.html
@@ -0,0 +1,74 @@
+{% extends 'workshop_app/base.html' %}
+
+ {% block title %}
+ Testimonals
+ {% endblock %}
+
+{% block header %}
+ <nav class="navbar navbar-default navbar-custom">
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand" href="{{ URL_ROOT }}/">Home</a>
+ </div>
+
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="{{ URL_ROOT }}/register/"><span class="glyphicon glyphicon-user"></span> Register</a></li>
+ <li><a href="{{ URL_ROOT }}/login/"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
+ </ul>
+ </div>
+ </nav>
+{% endblock %}
+
+ {% block extra %}
+ <link rel="stylesheet" href="{{ URL_ROOT }}/static/workshop_app/css/testimonials.css" type="text/css" />
+ {% endblock %}
+ {% block content %}
+
+ <div class="container content">
+ <div class="row">
+ <div class="col-md-6 col-md-offset-3">
+ <div class="testimonials">
+ {% for m in messages %}
+ <div class="active item">
+ <div class="carousel-info">
+ <div class="pull-left">
+ <span class="testimonials-name">{{ m.name }},</span>
+ <span class="testimonials-post">{{ m.institute }}</span><br>
+ </div>
+ </div>
+ <blockquote><p>{{m.message}}</p></blockquote>
+ </div>
+ {% endfor %}
+ </div>
+ </div>
+ </div>
+ </div>
+
+ <!-- Page Navigation -->
+ <div class="container">
+
+ <div class="Page-Nav" align="center">
+ <nav aria-label="Page navigation">
+ <ul class="pagination pagination-sm">
+ <li class="page-item">
+ {% if messages.has_previous %}
+ <a class="page-link" tabindex="-1"
+ href="?page={{ messages.previous_page_number }}">Previous</a>
+ {% endif %}
+ </li>
+ <li class="page-item">
+ <span class="current">
+ Page {{ messages.number }} of {{ messages.paginator.num_pages }}
+ </span>
+ </li>
+ <li class="page-item">
+ {% if messages.has_next %}
+ <a class="page-link" href="?page={{ messages.next_page_number }}">Next
+ </a>
+ {% endif %}
+ </li>
+ </ul>
+ </nav>
+ </div>
+ </div>
+ {% endblock %}
diff --git a/workshop_app/templates/workshop_app/view_benefits.html b/workshop_app/templates/workshop_app/view_benefits.html
index 9b56244..76c9a85 100644
--- a/workshop_app/templates/workshop_app/view_benefits.html
+++ b/workshop_app/templates/workshop_app/view_benefits.html
@@ -10,18 +10,38 @@
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
+ <link href='//fonts.googleapis.com/css?family=Antic Slab' rel='stylesheet'>
{% endblock %}
{% block header %}
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
+ {% if request.user.profile.position == 'coordinator' %}
+ <div class="navbar-header">
+ <a class="navbar-brand" href="{{ URL_ROOT}}/book/">Home</a>
+ </div>
+ <ul class="nav navbar-nav">
+ <li><a href="{{ URL_ROOT}}/my_workshops/">My Workshops</a></li>
+ <li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
+ <li><a href="{{ URL_ROOT }}/faq/">FAQ</a></li>
+ <li class="active"><a href="{{ URL_ROOT }}/benefits/">Benefits</a>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
+ </li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> Profile </a></li>
+ <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
+ </ul>
+ {% else %}
<div class="navbar-header">
- <a class="navbar-brand" href="{{URL_ROOT}}/">Booking</a>
+ <a class="navbar-brand" href="{{URL_ROOT}}/">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/register/"><span class="glyphicon glyphicon-user"></span> Register</a></li>
<li><a href="{{ URL_ROOT }}/login/"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
+ {% endif %}
</div>
</nav>
{% endblock %}
@@ -29,14 +49,14 @@
{% block content %}
<div class="container">
- <h1>Features and Benefits:</h1><br>
- <p><h4>
+ <h1 style="font-family: 'Times New Roman';">Features and Benefits:</h1><br>
+ <p ><h4 style="font-family: 'Antic Slab';">
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>
+ <p><h4 style="font-family: 'Antic Slab';">
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 77ec095..b3eb5f1 100644
--- a/workshop_app/templates/workshop_app/view_faq.html
+++ b/workshop_app/templates/workshop_app/view_faq.html
@@ -17,13 +17,31 @@
{% block header %}
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
+ {% if request.user.profile.position == 'coordinator' %}
+ <div class="navbar-header">
+ <a class="navbar-brand" href="{{ URL_ROOT}}/book/">Home</a>
+ </div>
+ <ul class="nav navbar-nav">
+ <li><a href="{{ URL_ROOT}}/my_workshops/">My Workshops</a></li>
+ <li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
+ <li class="active"><a href="{{ URL_ROOT }}/faq/">FAQ's</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> Profile </a></li>
+ <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
+ </ul>
+ {% else %}
<div class="navbar-header">
- <a class="navbar-brand" href="{{URL_ROOT}}/">Booking</a>
+ <a class="navbar-brand" href="{{URL_ROOT}}/">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/register/"><span class="glyphicon glyphicon-user"></span> Register</a></li>
<li><a href="{{ URL_ROOT }}/login/"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
+ {% endif %}
</div>
</nav>
{% endblock %}
diff --git a/workshop_app/templates/workshop_app/view_profile.html b/workshop_app/templates/workshop_app/view_profile.html
index 751cc0b..5f01f83 100644
--- a/workshop_app/templates/workshop_app/view_profile.html
+++ b/workshop_app/templates/workshop_app/view_profile.html
@@ -9,22 +9,24 @@
<div class="container-fluid">
{% if request.user.profile.position == 'instructor' %}
<div class="navbar-header">
- <a class="navbar-brand" href="#">Instructor Profile</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/manage/">Home</a>
</div>
<ul class="nav navbar-nav">
- <li><a href="{{ URL_ROOT }}/manage/">Manage</a></li>
<li><a href="{{ URL_ROOT }}/create_workshop/">Create Workshop</a></li>
- <li><a href="{{ URL_ROOT }}/view_workshoptype_list/">View Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_list/">Workshop List</a></li>
<li><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
</ul>
{% else %}
<div class="navbar-header">
- <a class="navbar-brand" href="{{URL_ROOT}}/book/">Coordinator Profile</a>
+ <a class="navbar-brand" href="{{URL_ROOT}}/book/">Home</a>
</div>
<ul class="nav navbar-nav">
- <li><a href="{{ URL_ROOT }}/book/">Book</a></li>
<li><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a>
<li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li></li>
+ <li><a href="{{ URL_ROOT }}/faq/"> FAQ's</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a></li>
+ <li><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
</ul>
{% endif %}
diff --git a/workshop_app/templates/workshop_app/view_workshoptype_details.html b/workshop_app/templates/workshop_app/view_workshoptype_details.html
index 0cb989e..f47cf59 100644
--- a/workshop_app/templates/workshop_app/view_workshoptype_details.html
+++ b/workshop_app/templates/workshop_app/view_workshoptype_details.html
@@ -7,22 +7,43 @@
{% block extra %}
<!-- <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css"> -->
-
+
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
{% endblock %}
{% block header %}
<nav class="navbar navbar-default navbar-custom">
+ {% if request.user.profile.position == 'coordinator' %}
+ <div class="container-fluid">
+ <div class="navbar-header">
+ <a class="navbar-brand" href="{{ URL_ROOT}}/book/">Home</a>
+ </div>
+ <ul class="nav navbar-nav">
+ <li><a href="{{ URL_ROOT}}/my_workshops/">My Workshops</a></li>
+ <li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
+ <li><a href="{{ URL_ROOT }}/faq/">FAQ's</a></li>
+ <li><a href="{{ URL_ROOT }}/benefits/">Benefits</a>
+ <li class="active"><a href="{{ URL_ROOT }}/view_workshoptype_details/"> Workshop List</a></li>
+ <li><a href="{{ URL_ROOT }}/how_to_participate/">How to Participate</a></li>
+ </li>
+ </ul>
+ <ul class="nav navbar-nav navbar-right">
+ <li><a href="{{ URL_ROOT }}/view_profile/"><span class="glyphicon glyphicon-user"></span> Profile </a></li>
+ <li><a href="{{ URL_ROOT }}/logout/"><span class="glyphicon glyphicon-log-out"></span> Logout</a></li>
+ </ul>
+ </div>
+ {% else %}
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="{{URL_ROOT}}/">Booking</a>
+ <a class="navbar-brand" href="{{URL_ROOT}}/">Home</a>
</div>
<ul class="nav navbar-nav navbar-right">
<li><a href="{{ URL_ROOT }}/register/"><span class="glyphicon glyphicon-user"></span> Register</a></li>
<li><a href="{{ URL_ROOT }}/login/"><span class="glyphicon glyphicon-log-in"></span> Login</a></li>
</ul>
</div>
+ {% endif %}
</nav>
{% endblock %}
@@ -30,7 +51,7 @@
<div class="container">
- <table class="table table-hover" style="border-collapse:collapse;">
+ <table class="table table-hover">
<thead>
<tr>
<th>id</th>
@@ -45,26 +66,12 @@
<td scope="row" id="{{ forloop.counter }}">{{ forloop.counter }}</td>
<td>{{ w.workshoptype_name }}</td>
<td>{{ w.workshoptype_duration }}</td>
- <td><button class="btn btn-default btn-sm" class="accordion-toggle" data-toggle="collapse" href="#collapseOne{{ forloop.counter }}">View Workshop Details</button></td>
+ <td><a href="{{URL_ROOT}}/pdf_view/{{ w.workshoptype_name }}"class="btn btn-default btn-sm" class="accordion-toggle" >View Workshop Details</a></td>
</tr>
-
- <tr>
- <td colspan="12" class="hiddenRow">
- <div id="collapseOne{{ forloop.counter }}" class="accordion-body collapse">
- <table class="table table-striped">
- <tbody>
- <tr>
- <td>{{ w.workshoptype_description|safe }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- </tr>
</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>
</div>
<!-- Page Navigation -->
diff --git a/workshop_app/templates/workshop_app/view_workshoptype_list.html b/workshop_app/templates/workshop_app/view_workshoptype_list.html
index dddd119..d1c6034 100644
--- a/workshop_app/templates/workshop_app/view_workshoptype_list.html
+++ b/workshop_app/templates/workshop_app/view_workshoptype_list.html
@@ -10,17 +10,16 @@
<nav class="navbar navbar-default navbar-custom">
<div class="container-fluid">
<div class="navbar-header">
- <a class="navbar-brand" href="#">WebSiteName</a>
+ <a class="navbar-brand" href="{{ URL_ROOT }}/manage/">Home</a>
</div>
<ul class="nav navbar-nav">
{% if request.user.profile.position == 'instructor'%}
- <li><a href="{{ URL_ROOT }}/manage/">Manage</a></li>
<li><a href="{{ URL_ROOT }}/create_workshop/">Create Workshop</a></li>
{% else %}
<li><a href="{{ URL_ROOT }}/book/">Book</a></li>
<li><a href="{{ URL_ROOT }}/propose_workshop/">Propose a Workshop</a></li>
{% endif %}
- <li class="active"><a href="{{ URL_ROOT }}/view_workshoptype_list/">View Workshop List</a></li>
+ <li class="active"><a href="{{ URL_ROOT }}/view_workshoptype_list/">Workshop List</a></li>
<li><a href="{{ URL_ROOT }}/my_workshops/">My Workshops</a></li>
</ul>
@@ -44,7 +43,7 @@
<div class="container">
- <table class="table table-hover" style="border-collapse:collapse;">
+ <table class="table table-hover" >
<thead>
<tr>
<th>id</th>
@@ -55,33 +54,18 @@
{% for w in workshoptype %}
<tbody>
- <tr >
+ <tr>
<td scope="row" id="{{ forloop.counter }}">{{ forloop.counter }}</td>
<td>{{ w.workshoptype_name }}</td>
<td>{{ w.workshoptype_duration }}</td>
- <td><button class="btn btn-default btn-sm" class="accordion-toggle" data-toggle="collapse" href="#collapseOne{{ forloop.counter }}">View Workshop Details</button></td>
+ <td><a class="btn btn-default btn-sm" href="{{URL_ROOT}}/pdf_view/{{ w.workshoptype_name }}">View Workshop Details</a></td>
{% if request.user.profile.position == 'coordinator' %}
- <td><button class="btn btn-default btn-sm" ><a href="{{ URL_ROOT }}/book/">Book</a></button></td>
{% endif %}
</tr>
-
- <tr>
- <td colspan="12" class="hiddenRow">
- <div id="collapseOne{{ forloop.counter }}" class="accordion-body collapse">
- <table class="table table-striped">
- <tbody>
- <tr>
- <td>{{ w.workshoptype_description|safe }}</td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- </tr>
</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>
</div>
<!-- Page Navigation -->
diff --git a/workshop_app/tests/test_views.py b/workshop_app/tests/test_views.py
index fd93a3a..b37e416 100644
--- a/workshop_app/tests/test_views.py
+++ b/workshop_app/tests/test_views.py
@@ -29,7 +29,7 @@ class TestProfile(TestCase):
self.user2_profile = Profile.objects.create(
user=self.user2,
- department='cs',
+ department='Computer Engineering',
institute='ace',
position='instructor',
phone_number='1122993388',
@@ -66,28 +66,30 @@ class TestProfile(TestCase):
self.client.login(username=self.user2, password='pass@123')
response = self.client.get(reverse(edit_profile))
+ user_profile = User.objects.get(id=self.user2.id)
+ profile = Profile.objects.get(user=user_profile)
self.assertEqual(response.status_code, 200)
+ self.assertEqual(profile.institute, 'ace')
self.client.logout()
def test_edit_profile_post(self):
self.client.login(username=self.user2, password='pass@123')
response = self.client.post('/edit_profile/',
- data = {
+ {
'first_name': 'demo_test',
'last_name': 'user2',
'institute': 'IIT',
- 'department': 'Aerospace'
- })
+ 'department': 'aerospace engineering'
+ })
updated_profile_user = User.objects.get(id=self.user2.id)
updated_profile = Profile.objects.get(user=updated_profile_user)
-
self.assertEqual(updated_profile.institute, 'IIT')
- self.assertEqual(updated_profile.department, 'Aerospace')
+ self.assertEqual(updated_profile.department, 'aerospace engineering')
self.assertEqual(updated_profile.position, 'instructor')
self.assertEqual(response.status_code, 200)
- self.assertTemplateUsed(response, 'workshop_app/profile_updated.html')
+ # self.assertTemplateUsed(response, 'workshop_app/profile_updated.html')
class TestWorkshopCreation(TestCase):
diff --git a/workshop_app/urls.py b/workshop_app/urls.py
index 60da52e..d0b004b 100644
--- a/workshop_app/urls.py
+++ b/workshop_app/urls.py
@@ -23,6 +23,7 @@ js_info_dict = {
}
+
urlpatterns = [
url(r'^$', views.index, name='index'),
url(r'^register/$', views.user_register),
@@ -42,6 +43,8 @@ urlpatterns = [
url(r'^view_workshoptype_details/$', views.view_workshoptype_details),
url(r'^create_workshop/$', views.create_workshop),
url(r'^propose_workshop/$', views.propose_workshop),
+ url(r'^testimonials/$', views.testimonials),
+ url(r'^pdf_view/(?P<workshop_title>[\w|\W]+)$', views.pdf_view),
url(r'^jsi18n/$', django.views.i18n.javascript_catalog, js_info_dict),
]
diff --git a/workshop_app/urls_password_reset.py b/workshop_app/urls_password_reset.py
new file mode 100644
index 0000000..c1e36c6
--- /dev/null
+++ b/workshop_app/urls_password_reset.py
@@ -0,0 +1,20 @@
+from django.conf.urls import patterns, url
+from django.contrib.auth.views import password_reset, password_reset_confirm,\
+ password_reset_done, password_reset_complete, password_change,\
+ password_change_done
+
+urlpatterns = [
+ url(r'^forgotpassword/$', password_reset,
+ name="password_reset"),
+ url(r'^password_reset/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$',
+ password_reset_confirm,
+ name='password_reset_confirm'),
+ url(r'^password_reset/mail_sent/$', password_reset_done,
+ name='password_reset_done'),
+ url(r'^password_reset/complete/$', password_reset_complete,
+ name='password_reset_complete'),
+ url(r'^changepassword/$', password_change,
+ name='password_change'),
+ url(r'^password_change/done/$', password_change_done,
+ name='password_change_done'),
+]
diff --git a/workshop_app/views.py b/workshop_app/views.py
index dafe5f9..5b00c87 100644
--- a/workshop_app/views.py
+++ b/workshop_app/views.py
@@ -7,7 +7,8 @@ from .models import (
Profile, User,
has_profile, Workshop,
WorkshopType, RequestedWorkshop,
- BookedWorkshop, ProposeWorkshopDate
+ BookedWorkshop, ProposeWorkshopDate,
+ Testimonial
)
from django.template import RequestContext
from datetime import datetime, date
@@ -23,10 +24,13 @@ 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
+import datetime as dt
__author__ = "Akshen Doke"
__credits__ = ["Mahesh Gudi", "Aditya P.", "Ankit Javalkar",
- "Prathamesh Salunke", "Akshen Doke", "Kiran Kishore",
+ "Prathamesh Salunke", "Kiran Kishore",
"KhushalSingh Rajput", "Prabhu Ramachandran"]
@@ -42,7 +46,7 @@ def index(request):
user = request.user
form = UserLoginForm()
- if user.is_authenticated():
+ if user.is_authenticated() and is_email_checked(user):
if user.groups.filter(name='instructor').count() > 0:
return redirect('/manage/')
return redirect('/book/')
@@ -140,6 +144,8 @@ def user_register(request):
{"form": form}
)
else:
+ if request.user.is_authenticated() and is_email_checked(request.user):
+ return redirect('/my_workshops/')
form = UserRegistrationForm()
return render(request, "workshop_app/register.html", {"form": form})
@@ -155,7 +161,7 @@ def book(request):
workshop_details = Workshop.objects.all()
workshop_occurence_list = []
- today = datetime.now()
+ today = datetime.now() + dt.timedelta(days=3)
for workshops in workshop_details:
dates = workshops.recurrences.between(
today,
@@ -315,9 +321,9 @@ def book_workshop(request):
phone_number=phone_number)
return HttpResponse(dedent("""\
- Thank You, Please check
- your email for further information. Your number on the
- queue for this book is {0}""".format(str(queue))))
+ Your request has been successful, Please check
+ your email for further information. Your request is number
+ {0} in the queue.""".format(str(queue))))
else:
return HttpResponse("Some Error Occurred.")
@@ -335,7 +341,7 @@ def manage(request):
)
workshop_occurence_list = []
- today = datetime.now()
+ today = datetime.now() + dt.timedelta(days=3)
for workshop in workshop_details:
workshop_occurence = workshop.recurrences.between(
today,
@@ -657,7 +663,11 @@ def propose_workshop(request):
@login_required
def view_profile(request):
""" view instructor and coordinator profile """
- return render(request, "workshop_app/view_profile.html")
+ user = request.user
+ if is_email_checked(user):
+ return render(request, "workshop_app/view_profile.html")
+ else:
+ return redirect('/login/')
@login_required
@@ -780,4 +790,46 @@ 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') \ No newline at end of file
+ return render(request, 'workshop_app/how_to_participate.html')
+
+def pdf_view(request, workshop_title):
+ if workshop_title == 'ISCP':
+ pdf_file = open(path.join(settings.MEDIA_ROOT,'ISCP schedule.pdf'), 'rb')
+ else:
+ pdf_file = open(path.join(settings.MEDIA_ROOT,'Basic Python Schedule.pdf'), 'rb')
+
+ return HttpResponse(pdf_file, content_type="application/pdf")
+
+def testimonials(request):
+ testimonials = Testimonial.objects.all().order_by('-id')
+ paginator = Paginator(testimonials, 3) #Show upto 12 workshops per page
+
+ page = request.GET.get('page')
+ try:
+ messages = paginator.page(page)
+ except PageNotAnInteger:
+ #If page is not an integer, deliver first page.
+ messages = paginator.page(1)
+ except EmptyPage:
+ #If page is out of range(e.g 999999), deliver last page.
+ messages = paginator.page(paginator.num_pages)
+ return render(request, 'workshop_app/testimonals.html', {"messages":messages})
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+