Until Django application creation by terminal (development environment)

■ Environment

Windows10home  Python3.7  Pycharm

■ Procedure

① Create virtual environment (command prompt)

1) Move to the directory you want to create

Example: Move to C: \ python_project

 C:\Users>cd C:\python_project

2) Create virtual environment (python -m venv (virtual environment name))

Example: Creating a virtual environment called venv_python_dev

 C:\python_project>python -m venv venv_python_dev

3) Enter the virtual environment (execute "activate.bat" of Scripts in the virtual)

 C:\python_project>cd venv_python_dev\Scripts
 C:\python_project\venv_python_dev\Scripts>activate.bat
 (venv_python_dev) C:\python_project\venv_python_dev\Scripts>

4) When exiting, "deactivate"

② Install Django (Terminal)

pip install Django

  (venv_python_dev) C:\python_project\venv_python_dev\Scripts>pip install Django

Successfully ... installed Django ... OK when it comes out   Django version check

 python -m django --version
  3.0.3

③ Djnago project creation

1) Move to the directory you want to create (here, the virtual environment)

 (venv_python_dev) C:\python_project\venv_python_dev\Scripts>cd  
 (venv_python_dev)  C:\python_project\venv_python_dev>C:\python_project\venv_python_dev

2) Create a project (Private_Diary_project here)

 (venv_python_dev) C:\python_project\venv_python_dev>django-admin startproject Private_Diary_project

④ Create Django application

1) Here, I want to create it in the project folder, so move the directory

 (venv_python_dev) C:\python_project\venv_python_dev>cd C:\python_project\venv_python_dev\Private_Diary_project
(venv_python_dev) C:\python_project\venv_python_dev\Private_Diary_project>

2) Application creation

Example: app_private_diary

(venv_python_dev) C:\python_project\venv_python_dev\Private_Diary_project>python C:\python_project\venv_python_dev\Private_Diary_project\manage.py startapp app_private_diary

⑤ Check the folder with pycharm

image.png

【file organization】

Project name -Project name      init.py      setting.py      urls.py      wsgi.py     -manage.py -Application name      migrations      int.py      admin.py      apps.py      models.py      tests.py      views.py

That's it.

Recommended Posts

Until Django application creation by terminal (development environment)
WEB application development using Django [Admin screen creation]
[Memo] Django development environment
Django development environment construction memo
Web application creation with Django
Django environment development on Windows 10
Ubuntu18.04 Development environment creation memo
django project development environment construction
WEB application development using Django [Django startup]
WEB application development using Django [Application addition]
[For beginners] Django -Development environment construction-
[Google App Engine] Flow from development environment construction to application creation
WEB application development using Django [Model definition]
Django development using virtualenv Procedures from virtual environment construction to new project / new application creation and initial settings
WEB application development using Django [Initial settings]
WEB application development using django-Development environment construction-
WEB application development using Django [Request processing]
WEB application development using Django [Template addition]
Application development using SQLite with Django (PTVS)
"Trash classification by image!" App creation diary day3 ~ Web application with Django ~
How to run a Django application on a Docker container (development and production environment)
Try creating a web application with Vue.js and Django (Mac)-(1) Environment construction, application creation
Build the fastest Django development environment with docker-compose
[Python] Build a Django development environment with Docker
Django tutorial summary for beginners by beginners ① (project creation ~)
Build a Django development environment with Doker Toolbox
From 0 to Django development environment construction to basic operation
Django environment construction
[Day 4] Application creation
django table creation
django environment construction
First Django development
Build a Django development environment using pyenv-virtualenv on Mac
Django tutorial (blog application creation) ② --model creation, management site preparation
Web application made with Python3.4 + Django (Part.1 Environment construction)
Build a machine learning application development environment with Python
Separation summary of development environment by chroot of various Linux
Build a development environment with Poetry Django Docker Pycharm
Prepare Django development environment using homebrew on MacOSX Mavericks (10.9)