ここではプロジェクトの主要な機能となる Comments アプリケーションを作成します.
(py39) C:\Users\lecture\Documents\django\custom_auth_project>python manage.py startapp comments ⏎ (py39) C:\Users\lecture\Documents\django\custom_auth_project>git add . ⏎ (py39) C:\Users\lecture\Documents\django\custom_auth_project>git commit -m"startapp comments" ⏎ [master c435fda] startapp comments 7 files changed, 18 insertions(+) create mode 100644 comments/__init__.py create mode 100644 comments/admin.py create mode 100644 comments/apps.py create mode 100644 comments/migrations/__init__.py create mode 100644 comments/models.py create mode 100644 comments/tests.py create mode 100644 comments/views.py (py39) C:\Users\lecture\Documents\django\custom_auth_project>
次にアプリケーションを有効化します.
custom_auth_project/settings.py
# Application definition
INSTALLED_APPS = [
'users.apps.UsersConfig',
'comments.apps.CommentsConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
]