Skip to content

Instantly share code, notes, and snippets.

@pyjavo
Last active July 29, 2019 16:45
Show Gist options
  • Save pyjavo/11256766 to your computer and use it in GitHub Desktop.
Save pyjavo/11256766 to your computer and use it in GitHub Desktop.
local_settings.py for Django
import os
DIRNAME = os.path.abspath(os.path.dirname(__file__))
# BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': 'nameDB',
'USER': 'root',
'PASSWORD': '12345',
'HOST': '',
'PORT': '',
}
}
'''
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'databaseDB',
'USER': 'username',
'PASSWORD': '',
'HOST': 'localhost',
'PORT': '',
}
}
'''
'''
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
'''
ALLOWED_HOSTS = ['*']
INTERNAL_IPS = (
'0.0.0.0',
'127.0.0.1',
)
MEDIA_ROOT = os.path.normpath(os.path.join(DIRNAME,"media/"))
# MEDIA_ROOT = os.path.normpath(os.path.join(BASE_DIR,"media/"))
MEDIA_URL = '/media/'
STATIC_ROOT = '/static/'
STATIC_URL = '/static/'
EMAIL_HOST = ''
EMAIL_HOST_USER = ''
EMAIL_HOST_PASSWORD = ''
DEFAULT_FROM_EMAIL = ''
SERVER_EMAIL = ''
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment