From f83563239fe821e4e2aeea3739b1499063158a0d Mon Sep 17 00:00:00 2001 From: komalsheth286 Date: Wed, 28 Sep 2016 10:42:21 +0530 Subject: Config file added --- scipy2016/settings.py | 27 +++-- website/models.py | 8 +- website/templates/abstract-details.html | 20 +--- website/templates/base.html | 30 ++--- website/templates/cfp.html | 18 +-- website/templates/comment-abstract.html | 60 ++++++---- website/templates/submit-cfp.html | 22 ++-- website/templates/submit-cfw.html | 15 +-- website/templates/user-register.html | 51 +------- website/templates/view-abstracts.html | 15 +-- website/views.py | 204 +++++++++++++++++++++----------- 11 files changed, 241 insertions(+), 229 deletions(-) diff --git a/scipy2016/settings.py b/scipy2016/settings.py index 9d4155b..7b43ace 100755 --- a/scipy2016/settings.py +++ b/scipy2016/settings.py @@ -11,6 +11,7 @@ https://docs.djangoproject.com/en/1.6/ref/settings/ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) # from local import * import os +from scipy2016.local import * BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -100,29 +101,35 @@ DATABASES = { 'ENGINE': 'django.db.backends.mysql', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. 'NAME': 'scipy2016', # Or path to database file if using sqlite3. # The following settings are not used with sqlite3: - 'USER': 'root', - 'PASSWORD': 'root', + 'USER': DBUSER, + 'PASSWORD': DBPWD, 'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. 'PORT': '', } } -LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = '628178553368-dvc6sjtgp90cm0591b8p4da62rhttn35.apps.googleusercontent.com' -LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = 'eoiek3jLz9Ax3dv7k3mXFrbU' +LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_KEY = GOOGLE_KEY +LOCAL_SOCIAL_AUTH_GOOGLE_OAUTH2_SECRET = GOOGLE_SECRET # API key AIzaSyDxRqGfJNJJIFw6traKTG5nC1mY8TNODu4 -LOCAL_SOCIAL_AUTH_FB_KEY = '160224867760606' -LOCAL_SOCIAL_AUTH_FB_SECRET = '45eb71682352723c44d79471ecab5894' +LOCAL_SOCIAL_AUTH_FB_KEY = FACEBOOK_KEY +LOCAL_SOCIAL_AUTH_FB_SECRET = FACEBOOK_SECRET + + +LOCAL_SOCIAL_AUTH_GITHUB_KEY = GITHUB_KEY +LOCAL_SOCIAL_AUTH_GITHUB_SECRET = GITHUB_SECRET + +# Internationalization +# https://docs.djangoproject.com/en/1.6/topics/i18n/ + +RECAPTCHA_PUBLIC_KEY = RECAPTCHA_PUBLIC +RECAPTCHA_PRIVATE_KEY = RECAPTCHA_PRIVATE -LOCAL_SOCIAL_AUTH_GITHUB_KEY = '0bcac418003a6d06fb50' -LOCAL_SOCIAL_AUTH_GITHUB_SECRET = 'cd1b070917d0a5c8cd27ef997fd353a4' # Internationalization # https://docs.djangoproject.com/en/1.6/topics/i18n/ -RECAPTCHA_PUBLIC_KEY = '76wtgdfsjhsydt7r5FFGFhgsdfytd656sad75fgh' -RECAPTCHA_PRIVATE_KEY = '6LcVu9ESAAAAAGxz7aEIACWRa3CVnXN3mFd-cajP' LANGUAGE_CODE = 'en-us' diff --git a/website/models.py b/website/models.py index fff26ce..d254e18 100755 --- a/website/models.py +++ b/website/models.py @@ -7,7 +7,7 @@ from scipy2016 import settings def get_document_dir(instance, filename): # ename, eext = instance.user.email.split("@") fname, fext = filename.split(".") - return '%s/attachment/%s/%s.%s' % (instance.user, instance.proposal_type, str(instance.user)+str(fext), fext) + return '%s/attachment/%s/%s.%s' % (instance.user, instance.proposal_type, str(instance.user), fext) class Proposal(models.Model): user = models.ForeignKey(User) @@ -24,7 +24,11 @@ class Proposal(models.Model): status = models.CharField(max_length = 100, default='Pending', editable=True) proposal_type = models.CharField(max_length = 100) tags = models.CharField(max_length = 250) - rate = models.CharField(max_length=100) + +class Ratings(models.Model): + proposal = models.ForeignKey(Proposal) + user = models.ForeignKey(User) + rating = models.CharField(max_length=700) class Comments(models.Model): proposal = models.ForeignKey(Proposal) diff --git a/website/templates/abstract-details.html b/website/templates/abstract-details.html index 32ab1a1..6dae590 100755 --- a/website/templates/abstract-details.html +++ b/website/templates/abstract-details.html @@ -24,33 +24,26 @@
{% block nav %} -
+ {% endblock %} + {% block content %}
@@ -65,9 +58,8 @@

Date Created:  {{ proposal.date_created }}

{% if proposal.attachment.url %}

Attachment:   - {{proposal.attachment}}

+ {{filename}}

{% endif %} - Rate:  {{proposal.rate}} /10

Comments:


{% for comment in comments %} diff --git a/website/templates/base.html b/website/templates/base.html index 8c37dcd..a6b0988 100755 --- a/website/templates/base.html +++ b/website/templates/base.html @@ -11,6 +11,7 @@ + @@ -48,11 +49,7 @@
  • Sponsors
  • Contact
  • {% if user and not user.is_anonymous %} -
  • Login
  • @@ -91,21 +88,19 @@

    SPEAKERS

    - +
    - - - - -
    +

    Dr. Ajith Kumar

        
    +

    Mr. S. Anand

         @@ -114,7 +109,6 @@
    Dr. B. P. Ajith Kumar, a scientist working with the IUAC. His main area of work is development of instrumentation for particle accelerators and associated experiments, including radio-frequency accelerating structures, control and data acquisition systems, digital and radio frequency electronics modules. He initiated the Phoenix / expEYES project. ExpEYES is currently the cheapest educational system to teach science. Anand is the Chief Executive Officer at Gramener. He leads a team of data enthusiasts with skills in analysis, design, programming and statistics. He studied at IIT Madras, IIM Bangalore and LBS, and worked at IBM, Infosys, Lehman Brothers and BCG. He and his team explore insights from data and communicate these as visual stories. These visual analyses and dashboards are built on the Gramener Visualisation Server -- Gramener's flagship product.
    @@ -172,6 +166,7 @@ Accomodation

    ₹500

    + Add Ons Accommodation is provided on a shared basis (twin sharing) inside IIT-B campus (Boys/Girls hostel). Accommodation will be provided for 2 days, i.e, 10-11 and 11-12 December. Accommodation does not include other amenities like dinner, etc. Extension of period of stay is not available. This is a non-refundable ticket. @@ -180,6 +175,7 @@ T-Shirt

    ₹350

    + Add Ons Change of size, exchange at the venue is not available. This is a non-refundable ticket. @@ -205,8 +201,6 @@

    SCHEDULE

    To be announced

    - -

    @@ -218,9 +212,9 @@

    VENUE

    Lecture Hall Complex, IIT Bombay

    - +
    - +
    @@ -254,7 +248,7 @@

    Write to Us

    Feel free to send us an email if you have any questions.

    -
    {% csrf_token %} + {% csrf_token %}
    @@ -287,7 +281,7 @@
    Phone
    (+91) 22 25764133
    Email
    -
    info [at] fossee [dot] in +
    scipy [at] fossee [dot] in
      @@ -322,7 +316,7 @@ - + +