diff options
author | Akshen | 2017-05-15 15:50:39 +0530 |
---|---|---|
committer | Akshen | 2017-05-19 15:30:31 +0530 |
commit | aef28fae505089994f10c7d1786f8007c5023641 (patch) | |
tree | 2934b60bfb2cf95a20a86aef7392cb450c460a3f /workshop_app | |
parent | a68a73242fb6bdf79625928efac98293c17d9bc0 (diff) | |
download | workshop_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
Diffstat (limited to 'workshop_app')
-rw-r--r-- | workshop_app/forms.py | 14 | ||||
-rw-r--r-- | workshop_app/models.py | 2 | ||||
-rw-r--r-- | workshop_app/send_mails.py | 23 | ||||
-rw-r--r-- | workshop_app/static/workshop_app/img/img2.jpg | bin | 0 -> 43634 bytes | |||
-rw-r--r-- | workshop_app/static/workshop_app/img/img2.png | bin | 14023 -> 0 bytes | |||
-rw-r--r-- | workshop_app/templates/workshop_app/activation.html | 2 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/how_to_participate.html | 2 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/register.html | 7 | ||||
-rw-r--r-- | workshop_app/templates/workshop_app/view_workshoptype_list.html | 2 |
9 files changed, 32 insertions, 20 deletions
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 Binary files differnew file mode 100644 index 0000000..fd18675 --- /dev/null +++ b/workshop_app/static/workshop_app/img/img2.jpg diff --git a/workshop_app/static/workshop_app/img/img2.png b/workshop_app/static/workshop_app/img/img2.png Binary files differdeleted file mode 100644 index 0e47923..0000000 --- a/workshop_app/static/workshop_app/img/img2.png +++ /dev/null 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> |