Browse Source

Preparations for production

sleepytaco 3 years ago
parent
commit
dc04996e7f
5 changed files with 3 additions and 13 deletions
  1. 1 1
      UnTube/asgi.py
  2. 0 6
      UnTube/config.py
  3. 1 0
      UnTube/secrets.py
  4. 1 4
      UnTube/wsgi.py
  5. 0 2
      requirements.txt

+ 1 - 1
UnTube/asgi.py

@@ -15,7 +15,7 @@ settings_module = "UnTube.production" if 'UNTUBE' in os.environ else 'UnTube.set
 os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings_module)
 
 # to use env variables on pythonanywhere
-project_folder = os.path.expanduser('~')
+project_folder = os.path.expanduser('/home/bakaabu')
 load_dotenv(os.path.join(project_folder, '.env'))
 
 application = get_asgi_application()

+ 0 - 6
UnTube/config.py

@@ -1,6 +0,0 @@
-SOCIAL_AUTH_GOOGLE_CLIENT_ID = '901333803283-1lscbdmukcjj3qp0t3relmla63h6l9k6.apps.googleusercontent.com'
-SOCIAL_AUTH_GOOGLE_CLIENT_SECRET = 'ekdBniL-_mAnNPwCmugfIL2q'
-
-SOCIAL_AUTH_LOGIN_REDIRECT_URL = '/home/'
-SOCIAL_AUTH_LOGIN_URL = '/'
-

+ 1 - 0
UnTube/secrets.py

@@ -3,4 +3,5 @@ SECRETS = {"SECRET_KEY": 'django-insecure-ycs22y+20sq67y(6dm6ynqw=dlhg!)%vuqpd@$
            "YOUTUBE_V3_API_KEY": 'AIzaSyCBOucAIJ5PdLeqzTfkTQ_6twsjNaMecS8',
                     "GOOGLE_OAUTH_CLIENT_ID": "901333803283-1lscbdmukcjj3qp0t3relmla63h6l9k6.apps.googleusercontent.com",
            "GOOGLE_OAUTH_CLIENT_SECRET": "ekdBniL-_mAnNPwCmugfIL2q",
+           "GOOGLE_OAUTH_SCOPES": ['https://www.googleapis.com/auth/youtube'],
            "UNSPLASH_API_ACCESS_KEY": "fGf0hsfg24Hj1mUrwvtETl1Dl2-TvaMP3w1moGEb1hs"}

+ 1 - 4
UnTube/wsgi.py

@@ -11,14 +11,11 @@ import os
 from dotenv import load_dotenv
 from django.core.wsgi import get_wsgi_application
 
-# If WEBSITE_HOSTNAME is defined as an environment variable, then we're running
-# on Azure App Service and should use the production settings in production.py.
-# settings_module = "UnTube.production" if 'WEBSITE_HOSTNAME' in os.environ else 'UnTube.settings'
 settings_module = "UnTube.production" if 'UNTUBE' in os.environ else 'UnTube.settings'
 os.environ.setdefault('DJANGO_SETTINGS_MODULE', settings_module)
 
 # to use env variables on pythonanywhere
-project_folder = os.path.expanduser('~')
+project_folder = os.path.expanduser('/home/bakaabu')
 load_dotenv(os.path.join(project_folder, '.env'))
 
 application = get_wsgi_application()

+ 0 - 2
requirements.txt

@@ -62,8 +62,6 @@ requests==2.25.1
 requests-oauthlib==1.3.0
 rsa==4.7.2
 six==1.16.0
-social-auth-app-django==4.0.0
-social-auth-core==4.1.0
 sqlparse==0.4.1
 Unidecode==1.1.2
 uritemplate==3.0.1