From ed6de6d3431bc98a19c08849deaeca707a5b41b7 Mon Sep 17 00:00:00 2001
From: hiruthikj <hiruthik27@gmail.com>
Date: Sun, 27 Dec 2020 18:57:23 +0530
Subject: [PATCH] add procfile

---
 .../book_management_system/Procfile           |   1 +
 .../book_management_system/settings.py        |  18 ++++++++++++++++++
 .../book_management_system/wsgi.py            |   5 +++++
 requirements.txt                              | Bin 160 -> 360 bytes
 4 files changed, 24 insertions(+)
 create mode 100644 book_management_system/book_management_system/Procfile

diff --git a/book_management_system/book_management_system/Procfile b/book_management_system/book_management_system/Procfile
new file mode 100644
index 0000000..00124df
--- /dev/null
+++ b/book_management_system/book_management_system/Procfile
@@ -0,0 +1 @@
+web: gunicorn myproject.wsgi
\ No newline at end of file
diff --git a/book_management_system/book_management_system/settings.py b/book_management_system/book_management_system/settings.py
index 5c66114..acb98ff 100644
--- a/book_management_system/book_management_system/settings.py
+++ b/book_management_system/book_management_system/settings.py
@@ -138,3 +138,21 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'media')
 
 LOGIN_URL = '/accounts/login/'
 LOGIN_REDIRECT_URL = '/online_books/home/'
+
+
+# Allow all host hosts/domain names for this site
+ALLOWED_HOSTS = ['*']
+
+# Parse database configuration from $DATABASE_URL
+import dj_database_url
+
+DATABASES = { 'default' : dj_database_url.config()}
+
+# Honor the 'X-Forwarded-Proto' header for request.is_secure()
+SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
+
+# try to load local_settings.py if it exists
+try:
+    from local_settings import *
+except Exception as e:
+    pass
diff --git a/book_management_system/book_management_system/wsgi.py b/book_management_system/book_management_system/wsgi.py
index bff50f8..918462b 100644
--- a/book_management_system/book_management_system/wsgi.py
+++ b/book_management_system/book_management_system/wsgi.py
@@ -14,3 +14,8 @@ from django.core.wsgi import get_wsgi_application
 os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'book_management_system.settings')
 
 application = get_wsgi_application()
+
+# from django.core.wsgi import get_wsgi_application
+# from dj_static import Cling
+
+# application = Cling(get_wsgi_application())
diff --git a/requirements.txt b/requirements.txt
index 2120504b523de18d605cb740c483acfefddf93f9..6cf94ae60618fdf6c3ba49062e46ef1c935b4fef 100644
GIT binary patch
delta 201
zcmZ3$_=0JIl79+A7K1KB3PU182}2@75<?<GF+(bYE<-6p5kn4xErTtC0fQccDT5w^
z0Rt}s7Xw6nF<5m8LncEqTn$K_*+f}oZ;+BihCGIJhI|HHh7yK+hJ1z`h9rhmh8%_x
q6y=6sBhwj58S=nJ<uep9<bhQffvq)|Xr8HnY?m=u5@eG(+(iH<At8JK

delta 12
TcmaFCw19Df(!?^ki7yfWAjkzg

-- 
GitLab