Pytter settings
セッティングも若干変更。mediaディレクトリを使えるようにした事と、admin追加したのと、oneAppを追加したくらいかな?色々めんどくさいのでsqliteでやってます。
# encoding:utf-8 # Django settings for Pytter project. import os BASE_PATH = os.path.abspath(os.path.split(__file__)[0]) DEBUG = True TEMPLATE_DEBUG = DEBUG ADMINS = ( # ('Your Name', 'your_email@domain.com'), ) MANAGERS = ADMINS DATABASE_ENGINE = 'sqlite3' # 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'ado_mssql'. DATABASE_NAME = 'database.sqlite' # Or path to database file if using sqlite3. DATABASE_USER = '' # Not used with sqlite3. DATABASE_PASSWORD = '' # Not used with sqlite3. DATABASE_HOST = '' # Set to empty string for localhost. Not used with sqlite3. DATABASE_PORT = '' # Set to empty string for default. Not used with sqlite3. TIME_ZONE = 'Asia/Tokyo' LANGUAGE_CODE = 'ja_JP' SITE_ID = 1 USE_I18N = True MEDIA_ROOT = os.path.join(BASE_PATH, 'media') MEDIA_URL = '/site/' ADMIN_MEDIA_PREFIX = '/media/' SECRET_KEY = '-q=^y$e9q2angf8-lm3+thm=ox9!w9!08a%5v^^jw_)i#gi$ud' TEMPLATE_LOADERS = ( 'django.template.loaders.filesystem.load_template_source', 'django.template.loaders.app_directories.load_template_source', 'django.template.loaders.eggs.load_template_source', ) MIDDLEWARE_CLASSES = ( 'django.middleware.common.CommonMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.middleware.doc.XViewMiddleware', ) ROOT_URLCONF = 'Pytter.urls' TEMPLATE_DIRS = (os.path.join(BASE_PATH, 'templates') ) INSTALLED_APPS = ( 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.sites', 'django.contrib.admin', 'Pytter.one', )