From ec074954cb7721f8e0e2646fae4e05cbc3658cdf Mon Sep 17 00:00:00 2001 From: niniack Date: Thu, 23 Jul 2020 09:20:09 -0400 Subject: [PATCH 1/3] Change comments to reflect move to Django 3 --- README.md | 2 +- manage.py | 1 + project_name/settings.py | 17 +++++++++++------ project_name/urls.py | 4 ++-- project_name/wsgi.py | 4 ++-- 5 files changed, 17 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index ac6335ab..9ec69757 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # Heroku Django Starter Template -An utterly fantastic project starter template for Django 2.0. +An utterly fantastic project starter template for Django 3.0. ## Features diff --git a/manage.py b/manage.py index 5651ac24..b0c17f61 100755 --- a/manage.py +++ b/manage.py @@ -1,4 +1,5 @@ #!/usr/bin/env python +"""Django's command-line utility for administrative tasks.""" import os import sys diff --git a/project_name/settings.py b/project_name/settings.py index 527350b2..40e553f7 100644 --- a/project_name/settings.py +++ b/project_name/settings.py @@ -3,10 +3,10 @@ https://github.com/heroku/heroku-django-template For more information on this file, see -https://docs.djangoproject.com/en/2.0/topics/settings/ +https://docs.djangoproject.com/en/3.0/topics/settings/ For the full list of settings and their values, see -https://docs.djangoproject.com/en/2.0/ref/settings/ +https://docs.djangoproject.com/en/3.0/ref/settings/ """ import os @@ -19,7 +19,7 @@ # Quick-start development settings - unsuitable for production -# See https://docs.djangoproject.com/en/2.0/howto/deployment/checklist/ +# See https://docs.djangoproject.com/en/3.0/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = "{{ secret_key }}" @@ -27,6 +27,8 @@ # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True +ALLOWED_HOSTS = [] + # Application definition INSTALLED_APPS = [ @@ -76,7 +78,7 @@ # Database -# https://docs.djangoproject.com/en/2.0/ref/settings/#databases +# https://docs.djangoproject.com/en/3.0/ref/settings/#databases DATABASES = { 'default': { @@ -85,6 +87,9 @@ } } +# Password validation +# https://docs.djangoproject.com/en/3.0/ref/settings/#auth-password-validators + AUTH_PASSWORD_VALIDATORS = [ { 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', @@ -101,7 +106,7 @@ ] # Internationalization -# https://docs.djangoproject.com/en/2.0/topics/i18n/ +# https://docs.djangoproject.com/en/3.0/topics/i18n/ LANGUAGE_CODE = 'en-us' TIME_ZONE = 'UTC' @@ -119,7 +124,7 @@ ALLOWED_HOSTS = ['*'] # Static files (CSS, JavaScript, Images) -# https://docs.djangoproject.com/en/2.0/howto/static-files/ +# https://docs.djangoproject.com/en/3.0/howto/static-files/ STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles') STATIC_URL = '/static/' diff --git a/project_name/urls.py b/project_name/urls.py index f1716bee..709ddad1 100644 --- a/project_name/urls.py +++ b/project_name/urls.py @@ -1,7 +1,7 @@ -"""{{ project_name }} URL Configuration +"""project_name URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: - https://docs.djangoproject.com/en/2.0/topics/http/urls/ + https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views diff --git a/project_name/wsgi.py b/project_name/wsgi.py index adc08118..da5d9d6b 100644 --- a/project_name/wsgi.py +++ b/project_name/wsgi.py @@ -1,10 +1,10 @@ """ -WSGI config for {{ project_name }} project. +WSGI config for project_name project. It exposes the WSGI callable as a module-level variable named ``application``. For more information on this file, see -https://docs.djangoproject.com/en/2.0/howto/deployment/wsgi/ +https://docs.djangoproject.com/en/3.0/howto/deployment/wsgi/ """ import os From c313391488e4d660b510c4837d90ed6ae4303f00 Mon Sep 17 00:00:00 2001 From: niniack Date: Thu, 23 Jul 2020 09:34:32 -0400 Subject: [PATCH 2/3] add dj_database_url to Pipfile --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 77827ab3..68b767c2 100644 --- a/Pipfile +++ b/Pipfile @@ -13,9 +13,9 @@ python_version = "3.6" [packages] "psycopg2-binary" = "*" +dj_database_url="*" django-heroku = "*" gunicorn = "*" [dev-packages] - From 59f0910d2eef0a0a14b225ce833dac8c21b7669e Mon Sep 17 00:00:00 2001 From: niniack Date: Thu, 23 Jul 2020 09:58:29 -0400 Subject: [PATCH 3/3] fix dj_database_url -> dj-database-url --- Pipfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Pipfile b/Pipfile index 68b767c2..b7740d68 100644 --- a/Pipfile +++ b/Pipfile @@ -13,7 +13,7 @@ python_version = "3.6" [packages] "psycopg2-binary" = "*" -dj_database_url="*" +dj-database-url="*" django-heroku = "*" gunicorn = "*"