Model Data collection Template Screen display template View Control of screen transition destination
http://djangoproject.jp/doc/ja/1.0/faq/general.html
sudo easy_install pip
sudo pip install django
django-admin.py startproject project name
The following will be created Project name ├── manage.py ├── Project name │ ├── init.py │ ├── settings.py │ ├── urls.py │ ├── wsgi.py
python manage.py startapp application name
The following is configured ├── Application name │ ├── init.py │ ├── admin.py // What you need for the admin screen to mess with the DB │ ├── models.py // DB Model │ ├── tests.py │ └── views.py
Create a Model Set admin
python manage.py makemigrations application name
Additional configuration of migrations based on the model in the application ├── Application name │ ├── init.py │ ├── admin.py │ ├── migrations // DB definition There is a file for configuration │ │ ├── 0001_initial.py │ │ └── init.py │ ├── models.py │ ├── tests.py │ └── views.py
python manage.py syncdb
DB definition update
Recommended Posts