0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

はじめに

Last updated at Posted at 2019-07-10

はじめに

初期設定
runserverしつつもやると、設定ミスに気づきやすい。

設定

setting.py
INSTALLED_APPS = [
    ...
    '<AppDir>.apps.<class>',
]
ALLOWED_HOSTS = ['*']
LANGUAGE_CODE = 'ja'
TIME_ZONE = 'Asia/Tokyo'

# 必要に応じて
STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')]
MEDIA_URL = '/media/'
DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.<>',
        'NAME': '<>',
        'USER': '<>',
        'PASSWORD': os.environ['<>'],
        'HOST': '<>',
    }
}
LOGGING = {
   ...
}
TEMPLATES = [
    {
        ...
        'DIRS': [],
    },
]

DB

create datacase web;
grant all on <db>.<tb> to '<user>';

Git

こちら

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?