forked from rc/aircox
		
	suite de rc/aircox#122 en suivant les conventions de nommage. Co-authored-by: Christophe Siraut <d@tobald.eu.org> Reviewed-on: rc/aircox#126 Co-authored-by: Chris Tactic <chris@tacticasbl.be> Co-committed-by: Chris Tactic <chris@tacticasbl.be>
		
			
				
	
	
		
			50 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			50 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
"""Django and Aircox instance settings. This file should be saved as
 | 
						|
`settings.py` in the same directory as this one.
 | 
						|
 | 
						|
User MUST define the following values: `SECRET_KEY`, `ALLOWED_HOSTS`, `DATABASES`
 | 
						|
 | 
						|
The following environment variables are used in settings:
 | 
						|
    * `AIRCOX_DEBUG` (`DEBUG`): enable/disable debugging
 | 
						|
 | 
						|
For Django settings see:
 | 
						|
    https://docs.djangoproject.com/en/3.1/topics/settings/
 | 
						|
    https://docs.djangoproject.com/en/3.1/ref/settings/
 | 
						|
"""
 | 
						|
from django.utils import timezone
 | 
						|
from zoneinfo import ZoneInfo
 | 
						|
from .prod import *
 | 
						|
 | 
						|
# FOR dev: from .dev import *
 | 
						|
 | 
						|
# Debug mode: set to True for dev
 | 
						|
# DEBUG = False
 | 
						|
LANGUAGE_CODE = "fr-BE"
 | 
						|
LC_LOCALE = "fr_BE.UTF-8"
 | 
						|
TIME_ZONE = "Europe/Brussels"
 | 
						|
 | 
						|
timezone.activate(ZoneInfo(TIME_ZONE))
 | 
						|
 | 
						|
# Secret key: you MUST put a consistent secret key. You can generate one
 | 
						|
# at https://djecrety.ir/
 | 
						|
SECRET_KEY = ""
 | 
						|
 | 
						|
# Database configuration: defaults to db.sqlite3
 | 
						|
# DATABASES
 | 
						|
 | 
						|
# Allowed host for HTTP requests
 | 
						|
# ALLOWED_HOSTS = ('127.0.0.1',)
 | 
						|
# CSRF_TRUSTED_ORIGINS=['https://aircox.radiocampus.be', 'https://radiocampus.be']
 | 
						|
 | 
						|
# When LC_LOCALE is set here, this code activates it.
 | 
						|
# Otherwise it can be removed
 | 
						|
try:
 | 
						|
    import locale
 | 
						|
 | 
						|
    locale.setlocale(locale.LC_ALL, LC_LOCALE)
 | 
						|
except Exception:
 | 
						|
    print(
 | 
						|
        "Can not set locale {LC}. Is it available on you system? Hint: "
 | 
						|
        "Check /etc/locale.gen and rerun locale-gen as sudo if needed.".format(LC=LANGUAGE_CODE)
 | 
						|
    )
 | 
						|
    pass
 |