summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xnccps2018/config.py24
-rw-r--r--nccps2018/settings.py11
-rw-r--r--nccps2018/wsgi.py10
-rw-r--r--website/views.py6
4 files changed, 39 insertions, 12 deletions
diff --git a/nccps2018/config.py b/nccps2018/config.py
index 0522005..31b2c3c 100755
--- a/nccps2018/config.py
+++ b/nccps2018/config.py
@@ -1,7 +1,7 @@
-DB_NAME_DEFAULT = 'DBNAME'
-DB_USER_DEFAULT = 'DBUSER'
-DB_PASS_DEFAULT = 'DBPWD'
-DB_HOST_DEFAULT = 'localhost'
+DB_NAME_DEFAULT = 'nccps'
+DB_USER_DEFAULT = 'root'
+DB_PASS_DEFAULT = 'aero123'
+DB_HOST_DEFAULT = '127.0.0.1'
DB_PORT_DEFAULT = ''
########################################
GOOGLE_KEY = 'GOOGLE_KEY'
@@ -25,12 +25,20 @@ EMAIL_HOST_SERVER = 'localhost'
EMAIL_PORT_SERVER = 25
#########################################
# Optional SMTP authentication information for EMAIL_HOST.
-EMAIL_HOST_USER_SERVER = ''
+EMAIL_HOST = '127.0.0.1'
+EMAIL_PORT = '25'
+EMAIL_HOST_USER = 'your username'
+EMAIL_HOST_PASSWORD = 'your password'
+EMAIL_USE_TLS = True
+SENDER_EMAIL = 'your email address'
+PRODUCTION_URL = "http://dwsim.fossee.aero.iitb.ac.in/nccps-2018"
+ADMIN_EMAIL = ""
+EMAIL_HOST_USER_SERVER = 'localhost'
EMAIL_HOST_PASSWORD_SERVER = ''
EMAIL_USE_TLS_SERVER = False
#########################################
-ALLOWED_HOSTS = 'allowed host value'
+ALLOWED_HOSTS_VAL = ['dwsim.fossee.aero.iitb.ac.in','10.101.11.205',]
DEBUG_VAL = True
-SITE = 'SITE'
-ROOT_URL_VAL = 'root url value' #http://127.0.0.1:8000
+SITE = 'http://dwsim.fossee.aero.iitb.ac.in/nccps-2018'
+ROOT_URL_VAL = 'http://dwsim.fossee.aero.iitb.ac.in/nccps-2018' #http://127.0.0.1:8000
#########################################
diff --git a/nccps2018/settings.py b/nccps2018/settings.py
index a54eaf4..7217aa5 100644
--- a/nccps2018/settings.py
+++ b/nccps2018/settings.py
@@ -131,6 +131,17 @@ STATICFILES_DIRS = [
'/../static/',
]
+
LOGIN_REDIRECT_URL = '/proposal'
LOGOUT_REDIRECT_URL = '/accounts/login'
LOG_FOLDER= os.path.join(BASE_DIR,'logs')
+
+# Email Connection Settings
+EMAIL_HOST = EMAIL_HOST
+EMAIL_HOST_USER = EMAIL_HOST_USER
+EMAIL_HOST_PASSWORD = EMAIL_HOST_PASSWORD
+EMAIL_PORT = EMAIL_PORT
+#EMAIL_USE_TLS = EMAIL_USE_TLS
+EMAIL_TIMEOUT = 300
+SENDER_EMAIL = SENDER_EMAIL
+
diff --git a/nccps2018/wsgi.py b/nccps2018/wsgi.py
index 25a3f46..f91acc6 100644
--- a/nccps2018/wsgi.py
+++ b/nccps2018/wsgi.py
@@ -8,9 +8,17 @@ https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
import os
+import sys
-from django.core.wsgi import get_wsgi_application
+
+sys.path.append('/Sites/nccps_2018/nccps-2018')
+sys.path.insert(1, '/Sites/nccps_2018/nccps-2018')
+sys.path.insert(1, '/Sites/nccps_2018/env_nccps/lib/python3.6/site-packages')
+
+activate_this = '/Sites/nccps_2018/env_nccps/bin/activate_this.py'
os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'nccps2018.settings')
+from django.core.wsgi import get_wsgi_application
application = get_wsgi_application()
+
diff --git a/website/views.py b/website/views.py
index 444c8f9..22896fd 100644
--- a/website/views.py
+++ b/website/views.py
@@ -170,7 +170,7 @@ def view_abstracts(request):
def user_login(request):
user = request.user
if request.user.is_authenticated:
- return redirect('/proposal/')
+ return redirect('/nccps-2018/proposal/')
else:
if request.method == "POST":
context = {}
@@ -183,7 +183,7 @@ def user_login(request):
login(request, user)
proposals = Proposal.objects.filter(user=request.user).count()
context['user'] = user
- return redirect('/proposal')
+ return redirect('/nccps-2018/proposal')
#template = loader.get_template('index.html')
#return render(request, 'index.html', context)
else:
@@ -988,4 +988,4 @@ def view_profile(request):
logout(request)
return redirect('/login/')
except:
- return redirect('/register/') \ No newline at end of file
+ return redirect('/register/')