[PYTHON] Django notes

Create a project

If there is no folder for the project

django-admin startproject ProjectName

If you have a folder for your project

#Execute under the project folder
django-admin startproject ProjectName .

Project settings

settings.py

settings.py


#language
LANGUAGE_CODE = 'ja'
#Time zone
TIME_ZONE = 'Asia/Tokyo'

Creating an application

python manage.py startapp AppName

settings.py

settings.py


INSTALLED_APPS = [
    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'AppName', #←←← added
]

Creating a virtual environment

python3 -m venv EnvName

Recommended Posts

django notes
Django notes
[Django] as_view () notes
Django Template notes
[Django] JWT notes
Celery notes on Django
Django
[Personal notes] Python, Django
[Django] Notes on using django-debug-toolbar
[Django] Directory structure practices + notes
django update
Django note 4
JetBrains_Learning Notes_003
Launch notes for existing Django applications
Django memorandum
django search
SQLAlchemy notes
Django Summary
pyenv notes
Django test
Django # 2 (template)
SQL notes
Django Note 5
Sphinx notes
Django hands-on
Touch django
Django Summary
Django basics
Django Shoho
Django defaults
Jupyter_Learning Notes_000
Django + Docker
Django Glossary
Django search
Install Django
Django: References
Django Note 1
Django note 3
Django note 2
Django startup
Django NullCharField
Step notes to get started with django
Miscellaneous notes about the Django REST framework
Django novice addicted error and solution notes
Django environment construction
pandas self-study notes
Python scraping notes
Django ~ settings.py edition ~
Mecab installation notes
Django Heroku Deploy 1
Django HTML Template # 2
Django Contact Form 2
Python study notes _000
Django begins part 1
Python learning notes
What is Django? .. ..
concurrent.futures Usage notes
Theano installation notes
Models in Django
Django function-based view
Python Django Tutorial (5)