Jelajahi Sumber

aggiunto controllo ambiente per server autorizzati

mauro 1 bulan lalu
induk
melakukan
010feb6041
1 mengubah file dengan 6 tambahan dan 2 penghapusan
  1. 6 2
      bpconverter/settings.py

+ 6 - 2
bpconverter/settings.py

@@ -26,7 +26,11 @@ SECRET_KEY = 'django-insecure-y%xo@^-@e9rg5e*ckd(0ma5jnv#91q1b-rm@!v$s251)rj8x(o
 # SECURITY WARNING: don't run with debug turned on in production!
 DEBUG = True
 
-ALLOWED_HOSTS = ['altemica.net',]
+#capture environment from google
+if 'ALLOWED' in os.environ:
+    allowed_hosts = os.environ['ALLOWED'].split(',')
+
+ALLOWED_HOSTS = allowed_hosts
 
 
 # Application definition
@@ -106,7 +110,7 @@ AUTH_PASSWORD_VALIDATORS = [
 # Internationalization
 # https://docs.djangoproject.com/en/4.1/topics/i18n/
 
-LANGUAGE_CODE = 'en-us'
+LANGUAGE_CODE = 'it-it'
 
 TIME_ZONE = 'UTC'