LoginSignup
15
13

More than 5 years have passed since last update.

MacにDjangoをインストール

Last updated at Posted at 2013-06-14

前提

  • homebrewインストール済み
  • /usr/local/binにパスが通っている事

pythonを入れる(homebrewで)

brew install python
これでpipも入ってくれる
※homebrewで入れたpythonが動くようにパスの設定をしておく事

Djangoを入れる(pipで)

sudo pip install django==1.5.1

django-admin.pyにパスが通ってないので、適当にパスを通す
sudo ln -s /usr/local/share/python/django-admin.py /usr/local/bin/

Djangoを動かす

プロジェクトを作る

django-admin.py startproject django_test
カレントディレクトリにdjango_testディレクトリが出来る。(名前は何でもいいが、文字と数字とアンダーバーしか使えない)

動かす!

cd django_test
python manage.py runserver

表示されたアドレスにブラウザでアクセスしてIt workd!って表示されればOK

15
13
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
15
13