Qiita Teams that are logged in
You are not logged in to any team

Log in to Qiita Team
Community
OrganizationAdvent CalendarQiitadon (β)
Service
Qiita JobsQiita ZineQiita Blog
Help us understand the problem. What is going on with this article?

Djangoメモ

プロジェクトを作成

プロジェクト用のフォルダがない場合

django-admin startproject ProjectName

プロジェクト用のフォルダがある場合

# プロジェクト用フォルダ配下で実行
django-admin startproject ProjectName .

プロジェクトの設定

settings.pyの編集

settings.py
# 言語
LANGUAGE_CODE = 'ja'
# タイムゾーン
TIME_ZONE = 'Asia/Tokyo'

アプリケーションの作成

python manage.py startapp AppName

settings.pyの編集

settings.py
INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'AppName', #←←←追加 
]

仮想環境の作成

python -m venv EnvName
saaaku
Why not register and get more from Qiita?
  1. We will deliver articles that match you
    By following users and tags, you can catch up information on technical fields that you are interested in as a whole
  2. you can read useful information later efficiently
    By "stocking" the articles you like, you can search right away