summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkshen2017-05-15 15:50:39 +0530
committerAkshen2017-05-19 15:30:31 +0530
commitaef28fae505089994f10c7d1786f8007c5023641 (patch)
tree2934b60bfb2cf95a20a86aef7392cb450c460a3f
parenta68a73242fb6bdf79625928efac98293c17d9bc0 (diff)
downloadworkshop_booking-aef28fae505089994f10c7d1786f8007c5023641.tar.gz
workshop_booking-aef28fae505089994f10c7d1786f8007c5023641.tar.bz2
workshop_booking-aef28fae505089994f10c7d1786f8007c5023641.zip
PRODUCTION URL
added production url, new flowchat and fixed broken links todo optimization and chatbot
-rw-r--r--static/workshop_app/css/faq.css5
-rw-r--r--static/workshop_app/css/index.css87
-rw-r--r--static/workshop_app/css/sticky-footer.css42
-rw-r--r--static/workshop_app/img/img2.jpgbin0 -> 43634 bytes
-rw-r--r--workshop_app/forms.py14
-rw-r--r--workshop_app/models.py2
-rw-r--r--workshop_app/send_mails.py23
-rw-r--r--workshop_app/static/workshop_app/img/img2.jpgbin0 -> 43634 bytes
-rw-r--r--workshop_app/static/workshop_app/img/img2.pngbin14023 -> 0 bytes
-rw-r--r--workshop_app/templates/workshop_app/activation.html2
-rw-r--r--workshop_app/templates/workshop_app/how_to_participate.html2
-rw-r--r--workshop_app/templates/workshop_app/register.html7
-rw-r--r--workshop_app/templates/workshop_app/view_workshoptype_list.html2
-rw-r--r--workshop_portal/settings.py3
14 files changed, 109 insertions, 80 deletions
diff --git a/static/workshop_app/css/faq.css b/static/workshop_app/css/faq.css
new file mode 100644
index 0000000..98b4f5c
--- /dev/null
+++ b/static/workshop_app/css/faq.css
@@ -0,0 +1,5 @@
+.num {
+ list-style-type: square;
+ font-family: 'Antic Slab';
+ font-size: 22px;
+}
diff --git a/static/workshop_app/css/index.css b/static/workshop_app/css/index.css
index a54f9b1..1087d24 100644
--- a/static/workshop_app/css/index.css
+++ b/static/workshop_app/css/index.css
@@ -1,63 +1,54 @@
+
body {
- background-color: #C8C5B6;
+ background-color: grey;
}
.fossee-label {
- padding-top: 90px;
- margin-left: 200px;
+ padding-top: 20%;
+ margin-left: 9%;
color: #6D5847;
- font-size: 70px;
+ font-size: 400%;
}
-
.logo {
- width: 600px;
- height: 70px;
- background: white;
float: left;
- margin-top: 40px;
- margin-left: 85px;
+ margin-top: 9%;
+ margin-left: 15%;
}
.label-bar {
color: #6D5847;
float: right;
- margin-top: 36px;
- font-size: 18px;
- margin-right: 30px;
+ margin-top: 9%;
+ font-size: 120%;
+ margin-right: 3%;
}
.login {
- margin-left: 330px;
- width: 420px;
- height: 470px;
+ margin-left: auto;
+ margin-right: 1%;
+ width: 40%;
+ height: 90%;
background: white;
}
#rectbox {
- border-radius: 25px;
+ border-radius: 9%;
background: #6D5847;
- padding: 20px;
- margin-left: 20px;
- margin-top: 10px;
- width: 350px;
- height: 120px;
+ padding: 3%;
+ margin-left: 10%;
+ margin-top: 3%;
+ width: 75%;
+ height: 60%;
}
-.caption-img {
- width:70px;
- height:75px;
- margin-top: -9px;
-}
-
/* Icons with their respective Images */
.icons {
background: white;
- height: 110px;
- margin-top: 15px;
+ margin-top: 3%;
}
figure.item {
@@ -69,56 +60,40 @@ figure.item {
/* The width of the container also implies margin around the images. */
}
-.caption-img {
- width:70px;
- height:75px;
- margin-top: 5px;
-}
-.caption {
- /* Make the caption a block so it occupies its own line. */
- display: block;
- color: #5A3700;
- padding-bottom: 10px;
-}
-/* Contact Us, Related Links and Organization Logo */
-.contact {
- width: 100%;
- margin: auto;
-}
+/* Contact Us, Related Links and Organization Logo css*/
.org-logo {
- margin-top: 30px;
- margin-left: 60px;
- float: left;
+ margin-top: 1%;
+ float: left;
color: #5A3700;
}
.related-links {
- font-size: 20px;
+ font-size: 120%;
color: #5A3700;
- margin-top: 12px;
- margin-left: 90px
+ text-align: center;
+ margin-top: 1%;
}
.contact-us {
- font-size: 20px;
+ font-size: 140%;
color: #5A3700;
- margin-top: 12px;
- margin-right: 10px;
+ margin-top: 1%;
+
float: right;
}
/* Footer */
.footer {
- position: absolute;
+ position: relative;
right: 0;
bottom: 0;
left: 0;
diff --git a/static/workshop_app/css/sticky-footer.css b/static/workshop_app/css/sticky-footer.css
index 42471ee..cb21144 100644
--- a/static/workshop_app/css/sticky-footer.css
+++ b/static/workshop_app/css/sticky-footer.css
@@ -1,8 +1,42 @@
+/* Navbar */
+.navbar-custom {
+ background-color:#6D5847;
+ color:black;
+ border-radius:0;
+}
+
+/* Text color */
+.navbar-custom .navbar-nav > li > a {
+ color:#fff;
+}
+
+/* OnActive Tab */
+.navbar-custom .navbar-nav > .active > a {
+ color: black;
+ background: white;
+}
+
+.navbar-custom .navbar-nav > li > a:hover,
+.navbar-custom .navbar-nav > li > a:focus,
+.navbar-custom .navbar-nav > .active > a:hover,
+.navbar-custom .navbar-nav > .active > a:focus,
+.navbar-custom .navbar-nav > .open >a {
+ text-decoration: none;
+ background-color: #fff;
+}
+
+/* Brand-CompanyName */
+.navbar-custom .navbar-brand {
+ color:#efefef;
+ background-color: black;
+}
+
+/* Footer CSS */
.footer {
- position: absolute;
- bottom: 0;
- padding-left: 75px;
-
+ position: relative;
+ bottom: 0;
+ right: 0;
+ left: 0;
}
.hiddenRow {
diff --git a/static/workshop_app/img/img2.jpg b/static/workshop_app/img/img2.jpg
new file mode 100644
index 0000000..fd18675
--- /dev/null
+++ b/static/workshop_app/img/img2.jpg
Binary files differ
diff --git a/workshop_app/forms.py b/workshop_app/forms.py
index cd4391a..8ca23ce 100644
--- a/workshop_app/forms.py
+++ b/workshop_app/forms.py
@@ -27,7 +27,7 @@ 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'
username = forms.CharField(max_length=32, help_text='''Letters, digits,
period only.''')
email = forms.EmailField()
@@ -154,6 +154,7 @@ class CreateWorkshop(forms.ModelForm):
"""
def __init__( self, *args, **kwargs ):
+ kwargs.setdefault('label_suffix', '')
super(CreateWorkshop, self).__init__( *args, **kwargs )
self.fields['recurrences'].label = " " #the trick to hide field :)
@@ -165,15 +166,16 @@ class CreateWorkshop(forms.ModelForm):
class ProposeWorkshopDateForm(forms.ModelForm):
"""
Coordinators will propose a workshop and date
- """
-
+ """
+
def __init__( self, *args, **kwargs ):
+ kwargs.setdefault('label_suffix', '')
super(ProposeWorkshopDateForm, self).__init__( *args, **kwargs )
- self.fields['conditionone'].label = " "
+ self.fields['conditionone'].label = ""
self.fields['conditionone'].required = True
- self.fields['conditiontwo'].label = " "
+ self.fields['conditiontwo'].label = ""
self.fields['conditiontwo'].required = True
- self.fields['conditionthree'].label = " "
+ self.fields['conditionthree'].label = ""
self.fields['conditionthree'].required = True
class Meta:
diff --git a/workshop_app/models.py b/workshop_app/models.py
index 46454f5..4c118bc 100644
--- a/workshop_app/models.py
+++ b/workshop_app/models.py
@@ -66,7 +66,7 @@ class Workshop(models.Model):
workshop_instructor = models.ForeignKey(User, on_delete=models.CASCADE)
workshop_title = models.ForeignKey(
WorkshopType, on_delete=models.CASCADE,
- help_text='Select the type of workshop.'
+ help_text=' [Select the type of workshop.] '
)
#For recurring workshops source: django-recurrence
recurrences = RecurrenceField()
diff --git a/workshop_app/send_mails.py b/workshop_app/send_mails.py
index 862cebd..11d3e23 100644
--- a/workshop_app/send_mails.py
+++ b/workshop_app/send_mails.py
@@ -3,7 +3,7 @@ __author__ = "Akshen Doke"
from django.core.mail import send_mail
from textwrap import dedent
from random import randint
-import hashlib
+import hashlib
from django.utils.crypto import get_random_string
from string import punctuation, digits
try:
@@ -15,7 +15,8 @@ from workshop_portal.settings import (
EMAIL_PORT,
EMAIL_HOST_USER,
EMAIL_HOST_PASSWORD,
- EMAIL_USE_TLS
+ EMAIL_USE_TLS,
+ PRODUCTION_URL
)
def generate_activation_key(username):
@@ -88,14 +89,14 @@ def send_email( request, call_on,
Your request as an Instructor at FOSSEE, IIT Bombay
has been received. Please click on the below link to
activate your account
- 127.0.0.1/activate_user/{0}
+ {0}/activate_user/{1}
You will be notified via email on
approval of your instructor account
within 3 working days.
In case of queries regarding the same revert to this
- email.""".format(key))
+ email.""".format(PRODUCTION_URL, key))
try:
send_mail(
@@ -110,12 +111,12 @@ def send_email( request, call_on,
#Send a mail to admin as well.
- message = dedent("""\
+ message = dedent("""\
A new instructor request has been received.
- Instructor name:{0}
- Instructor email:{1}
-
+ Instructor name: {0}
+ Instructor email: {1}
+
Please verify the profile and mail the user within 2
working days.""".format(request.user, request.user.email))
@@ -136,13 +137,13 @@ def send_email( request, call_on,
Your request as a coordinator has been accepted.
Please click on the below link to
activate your account
- 127.0.0.1/activate_user/{0}
+ {0}/activate_user/{1}
After activation you can proceed to book your dates for
the workshop(s).
In case of queries regarding workshop booking(s),
- revert to this email.""".format(key))
+ revert to this email.""".format(PRODUCTION_URL, key))
try:
send_mail(
@@ -225,7 +226,7 @@ def send_email( request, call_on,
Workshop title:{5}
You have accepted this booking. Detailed instructions have
- been sent to the coordinator. """.format(user_name, user_name,
+ been sent to the coordinator. """.format(user_name, other_email,
phone_number, institute, workshop_date, workshop_title))
send_smtp_email(request=request,
diff --git a/workshop_app/static/workshop_app/img/img2.jpg b/workshop_app/static/workshop_app/img/img2.jpg
new file mode 100644
index 0000000..fd18675
--- /dev/null
+++ b/workshop_app/static/workshop_app/img/img2.jpg
Binary files differ
diff --git a/workshop_app/static/workshop_app/img/img2.png b/workshop_app/static/workshop_app/img/img2.png
deleted file mode 100644
index 0e47923..0000000
--- a/workshop_app/static/workshop_app/img/img2.png
+++ /dev/null
Binary files differ
diff --git a/workshop_app/templates/workshop_app/activation.html b/workshop_app/templates/workshop_app/activation.html
index 069a397..10a1353 100644
--- a/workshop_app/templates/workshop_app/activation.html
+++ b/workshop_app/templates/workshop_app/activation.html
@@ -31,7 +31,7 @@
<div class="container">
<div class="jumbotron">
<h1>Activation Awaiting</h1>
- <p>Please check your email and activate your account within <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>3days</strong> from the date of registeration</p>
</div>
</div>
{% endif %}
diff --git a/workshop_app/templates/workshop_app/how_to_participate.html b/workshop_app/templates/workshop_app/how_to_participate.html
index cb7c6be..0d8cc6f 100644
--- a/workshop_app/templates/workshop_app/how_to_participate.html
+++ b/workshop_app/templates/workshop_app/how_to_participate.html
@@ -29,7 +29,7 @@
{% block content %}
<div class="container-fluid" style="margin-left:auto;">
- <img src="{{ URL_ROOT }}/static/workshop_app/img/img2.png">
+ <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/register.html b/workshop_app/templates/workshop_app/register.html
index 8163fef..6e688d5 100644
--- a/workshop_app/templates/workshop_app/register.html
+++ b/workshop_app/templates/workshop_app/register.html
@@ -20,6 +20,13 @@
{% endblock %}
{% block content %}
+ <style type="text/css">
+ label.required::after {
+ content: "*";
+ color: red;
+ }
+ </style>
+
<div class="container" >
<br>
<form action="" method="post">
diff --git a/workshop_app/templates/workshop_app/view_workshoptype_list.html b/workshop_app/templates/workshop_app/view_workshoptype_list.html
index 1153708..dddd119 100644
--- a/workshop_app/templates/workshop_app/view_workshoptype_list.html
+++ b/workshop_app/templates/workshop_app/view_workshoptype_list.html
@@ -60,7 +60,9 @@
<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>
+ {% 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>
diff --git a/workshop_portal/settings.py b/workshop_portal/settings.py
index 94c52a9..20bb4b5 100644
--- a/workshop_portal/settings.py
+++ b/workshop_portal/settings.py
@@ -147,5 +147,8 @@ EMAIL_USE_TLS = EMAIL_USE_TLS
EMAIL_TIMEOUT = 300
#EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' #Temp Solution
+#Change this to the production url
+PRODUCTION_URL = 'your_production_url'
+
LOGIN_REDIRECT_URL = '/profile'
SESSION_EXPIRE_AT_BROWSER_CLOSE = True