[PYTHON] [Learning memo] How to make an application with Django ~ From virtual environment to pushing to github ~

I'm using django, but I can't remember how to make it first, so I'd like to have a cohesive memo.

Open a terminal and create a new folder with mkdir

cd Desktop
mkdir myblog
cd ec

Open the myblog folder you created earlier from the desktop folder.

Create a virtual environment

Install pipenv with install and open virtual environment with shell

pipenv install
pipenv shell

Install Django in your virtual environment.

pipenv install django

Install the development package

pipenv install --dev autopep8 flake8

Make a project

django-admin startproject config .

Modify settings.py

LANGUAGE_CODE = 'ja'

TIME_ZONE = 'Asia/Tokyo'

Migrate

python manage.py migrate

Add to git

git init
git add .
git commit -m "firstcommit"

Allow to push to github

Open a new repository from your own page on github, give it a Repository name, and create it. Copy the url that appears on subsequent pages. At the terminal

git remote add origin (Copyed url)
git push origin master

If you put everything together, it will be long, so this time I will stop here.

Recommended Posts

[Learning memo] How to make an application with Django ~ From virtual environment to pushing to github ~
[Learning memo] How to make an application with Django ~ Until Hello World is displayed ~
How to build an application from the cloud using the Django web framework
From Python environment construction to virtual environment construction with anaconda
A memo to create a virtual environment (venv) before Django
How to make an HTTPS server with Go / Gin
I tried to make an OCR application with PySimpleGUI
Beginners try to make an online battle Othello web application with Django + React + Bootstrap (1)
Explaining how to make LINE BOT in the world's easiest way (2) [Preparing a bot application in a local environment with Django in Python]
How to convert an array to a dictionary with Python [Application]
Create an environment for "Deep Learning from scratch" with Docker
How to develop in a virtual environment of Python [Memo]
[Django] Memo to create an environment of Django + MySQL + Vue.js [Python]
How to build Anaconda virtual environment used in Azure Machine Learning and link with Jupyter
Learning history to participate in team application development with Python ~ Build Docker / Django / Nginx / MariaDB environment ~
How to get started with Django
How to authenticate with Django Part 2
How to authenticate with Django Part 3
Django development using virtualenv Procedures from virtual environment construction to new project / new application creation and initial settings
How to do arithmetic with Django template
How to create a clone from Github
How to create an NVIDIA Docker environment
Notes from installing Homebrew to building an Anaconda environment for Python with pyenv
I tried to extract a line art from an image with Deep Learning
How to run a Django application on a Docker container (development and production environment)
A new form of app that works with GitHub: How to make GitHub Apps
How to make an embedded Linux device driver (11)
How to share a virtual environment [About requirements.txt]
For beginners to build an Anaconda environment. (Memo)
How to create a Python virtual environment (venv)
How to make an embedded Linux device driver (8)
How to make an embedded Linux device driver (1)
How to make an embedded Linux device driver (4)
How to develop a cart app with Django
Start Django in a virtual environment with Pipenv
How to make a dictionary with a hierarchical structure.
How to make an embedded Linux device driver (7)
How to make an embedded Linux device driver (2)
How to crop an image with Python + OpenCV
How to make an embedded Linux device driver (3)
How to read an array with Python's ConfigParser
How to implement "named_scope" of RubyOnRails with Django
[Memo] Build a virtual environment with Pyenv + anaconda
How to make an embedded Linux device driver (6)
How to make an embedded Linux device driver (5)
From 0 to Django development environment construction to basic operation
progate Python learning memo (updated from time to time)
How to make an embedded Linux device driver (10)
How to make Linux compatible with Japanese keyboard
How to make an embedded Linux device driver (9)
How to clone github remote repository from atom
How to set up a Google Colab environment with Coursera's advanced machine learning courses
How to pass args or environment variables with Makefile and make command on #Linux
"Deep Learning from scratch" Self-study memo (No. 16) I tried to build SimpleConvNet with Keras
A story about how Windows 10 users created an environment to use OpenCV3 with Python 3.5
"Deep Learning from scratch" Self-study memo (No. 17) I tried to build DeepConvNet with Keras
How to quickly create a machine learning environment using Jupyter Notebook with UbuntuServer 16.04 LTS
How to make a 3D geometric figure with one click [From triangular pyramid to fractal]
[Cloud9] Try to build an environment with django 1.11 of Python 3.4 without understanding even 1 mm
I tried to build an environment for machine learning with Python (Mac OS X)
Django Learning Memo