差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン 前のリビジョン 次のリビジョン | 前のリビジョン | ||
python:django:django_install [2020/03/27 16:04] – [Windows] ともやん | python:django:django_install [2020/12/11 17:34] (現在) – [Linux] ともやん | ||
---|---|---|---|
行 1: | 行 1: | ||
- | < | + | ====== Django のインストール ====== |
- | < | + | ここでは、Python がインストールされていることを前提に説明を進めることにする。\\ |
- | #result pre { | + | |
- | overflow: scroll; | + | |
- | overflow-x: hidden; | + | |
- | font-size: 10px; | + | |
- | } | + | |
- | </ | + | |
- | </ | + | |
- | ====== Djangoのインストール ====== | + | |
- | ここでは、Pythonがインストールされていることを前提に説明を進めることにする。\\ | + | |
Python 環境の整え方は、[[python: | Python 環境の整え方は、[[python: | ||
行 20: | 行 11: | ||
<WRAP prewrap 100% #result> | <WRAP prewrap 100% #result> | ||
< | < | ||
+ | Looking in indexes: https:// | ||
Collecting django | Collecting django | ||
- | Downloading Django-1.9.1-py2.py3-none-any.whl (6.6MB) | + | Downloading |
- | 100% |████████████████████████████████| | + | 100% |████████████████████████████████| 7.8MB 4.2kB/s |
- | Installing collected packages: django | + | Collecting asgiref< |
- | Successfully installed django-1.9.1 | + | Downloading https:// |
+ | Collecting sqlparse> | ||
+ | Downloading https:// | ||
+ | 100% |████████████████████████████████| | ||
+ | Collecting pytz (from django) | ||
+ | Downloading https:// | ||
+ | 100% |████████████████████████████████| 512kB 52kB/s | ||
+ | Installing collected packages: | ||
+ | Successfully installed | ||
</ | </ | ||
</ | </ | ||
< | < | ||
- | $ python -c " | + | $ python -m django |
</ | </ | ||
<WRAP prewrap 100% #result> | <WRAP prewrap 100% #result> | ||
< | < | ||
- | 1.9.1 | + | 3.1.4 |
</ | </ | ||
</ | </ | ||
行 88: | 行 88: | ||
< | < | ||
$ django-admin.py | $ django-admin.py | ||
+ | </ | ||
+ | <WRAP prewrap 100% # | ||
+ | < | ||
Type ' | Type ' | ||
行 107: | 行 109: | ||
migrate | migrate | ||
runserver | runserver | ||
- | ~省略~ | + | sendtestemail |
+ | shell | ||
+ | showmigrations | ||
+ | sqlflush | ||
+ | sqlmigrate | ||
+ | sqlsequencereset | ||
+ | squashmigrations | ||
+ | startapp | ||
+ | startproject | ||
+ | test | ||
+ | testserver | ||
+ | Note that only Django core commands are listed as settings are not properly configured (error: Requested setting INSTALLED_APPS, | ||
</ | </ | ||
+ | </ | ||
===== Windows ===== | ===== Windows ===== | ||
行 114: | 行 128: | ||
> django-admin | > django-admin | ||
</ | </ | ||
- | <WRAP prewrap 100% #result> | + | <WRAP prewrap 100% #result_long> |
< | < | ||
Type ' | Type ' |