Created
August 2, 2013 02:44
-
-
Save KunihikoKido/6137149 to your computer and use it in GitHub Desktop.
django settings.py の主な変更箇所
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# -*- coding: utf-8 -*- | |
from os.path import abspath, dirname, join | |
PROJECT_PATH = abspath(dirname(__file__)) | |
DATABASES = { | |
'default': { | |
'ENGINE': 'django.db.backends.sqlite3', # Add 'postgresql_psycopg2', 'mysql', 'sqlite3' or 'oracle'. | |
'NAME': join(PROJECT_PATH, 'django.db'), # Or path to database file if using sqlite3. | |
# The following settings are not used with sqlite3: | |
'USER': '', | |
'PASSWORD': '', | |
'HOST': '', # Empty for localhost through domain sockets or '127.0.0.1' for localhost through TCP. | |
'PORT': '', # Set to empty string for default. | |
} | |
} | |
TIME_ZONE = 'Asia/Tokyo' | |
LANGUAGE_CODE = 'ja' | |
MEDIA_ROOT = join(PROJECT_PATH, 'htdocs', 'media') | |
MEDIA_URL = '/media/' | |
STATIC_ROOT = join(PROJECT_PATH, 'htdocs', 'static') | |
STATIC_URL = '/static/' | |
TEMPLATE_DIRS = ( | |
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". | |
# Always use forward slashes, even on Windows. | |
# Don't forget to use absolute paths, not relative paths. | |
join(PROJECT_PATH, 'templates'), | |
) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment