[django, python, mysqldb] Djangoセットアップ

| コメント(0) | トラックバック(0)
djangoをインストール後、新しいウェブアプリケーション・ディレクトリを作成する。
$ django-admin.py startproject <ウェブアプリケーション名>

作成したウェブアプリをテスト起動するには
$ python manage.py runserver localhost:8000


ウェブアプリケーションの
を適用させるにはDBにテーブルを作る必要がある。それをするには下記のコマンドで実行

$ python manage.py syncdb
Creating table auth_permission
Creating table auth_group
Creating table auth_user
Creating table auth_message
Creating table django_content_type
Creating table django_session
Creating table django_site

You just installed Django's auth system, which means you don't have any superusers defined.
Would you like to create one now? (yes/no): yes
Username (Leave blank to use 'tkobayashi'):
E-mail address: koba206@gmail.com
Password:
Password (again):
Superuser created successfully.
Installing index for auth.Permission model
Installing index for auth.Message model

参考URL:
http://docs.djangoproject.com/en/dev/intro/tutorial01/#intro-tutorial01

トラックバック(0)

トラックバックURL: http://www.koba206.com/cgi-bin/mt/mt-tb.cgi/32

コメントする