Link: Python and Django Full Stack Web Developer Bootcamp
- Python version ~= 3.6
python -m pip install -r requirements-to-freeze.txt --upgrade
python -m pip freeze > requirements.txt
./manage.py createsuperuser [username]
Line 13 - imports
import os
Line 18-20 - DIR setups
TEMPLATE_DIR = os.path.join(BASE_DIR, 'templates')
STATIC_DIR = os.path.join(BASE_DIR, 'static')
MEDIA_DIR = os.path.join(BASE_DIR, 'media')
Line 43 - last line of INSTALLED_APPS
- add app name
Line 56 - LOGGING
LOGGING = {
'version': 1,
'disable_existing_loggers': False,
"formatters": {
"console": {"format": "{asctime} [ {name} :: {module} ] [{levelname}] | {message}", "style": "{"}
},
'handlers': {
'console': {
'class': 'logging.StreamHandler', 'formatter': 'console',
},
},
'root': {
'handlers': ['console'],
'level': 'WARNING',
},
'loggers': {
'basic_app.views': {
'handlers': ['console'],
'level': os.getenv('DJANGO_LOG_LEVEL', 'INFO'),
'propagate': False,
},
},
}
Line 85 - TEMPLATES
- DIR
'DIRS': [TEMPLATE_DIR],
Line 136 - TIME_ZONE
TIME_ZONE = 'Africa/Johannesburg'