[PYTHON] [Note] Django project creation and terminology

MTV type framework

Model Data collection Template Screen display template View Control of screen transition destination

http://djangoproject.jp/doc/ja/1.0/faq/general.html

Environment

Install Python package software management tool

sudo easy_install pip

Django installation

sudo pip install django

Creating a project

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

Regarding the use of migration

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

[Note] Django project creation and terminology
Django Getting Started: 2_ Project Creation
Django note 4
Django Note 5
Django Note 1
Django note 3
Django note 2
Django project structure customization (splitting and structuring)
Ramen map creation with Scrapy and Django
django table creation
Django Project Baseline
Django tutorial summary for beginners by beginners ① (project creation ~)
Django project environment construction
[Note] Random number creation?
Django shift creation feature
[Note] PCA and t-SNE
Django --models.py and admin.py
Django --start project without start project
[Django] Rename the project
Django Girls Tutorial Note
Start a Django project
DJango Note: From the beginning (simplification and splitting of URLConf)
How to do the initial setup from Django project creation
Enable pip installation with Windows Azure website creation (Django project)
Shell to create django project
Web application creation with Django
Install Python 3.7 and Django 3.0 (CentOS)
Django installation and operation check
(Note) Django in Vagrant environment
Django input check and calendar input
Learning model creation, learning and reasoning
django timezone and language settings
Create and list Django models
django project development environment construction
Deploy django project to heroku
Organize [Django] commands and roles
[Note] [For myself] Django command
Django development using virtualenv Procedures from virtual environment construction to new project / new application creation and initial settings