web server's document root as this risks the possibility that people may be
able to view your code over the Web. This is a security risk.
- __ https://docs.djangoproject.com/en/1.11/intro/tutorial01/#creating-a-project
+ __ https://docs.djangoproject.com/en/2.2/intro/tutorial01/#creating-a-project
Next we require Python. If not already installed, then you should do so now.
Patchwork supports both Python 2.7 and Python 3.3+, though we're going to use
``DJANGO_SECRET_KEY``, ``DATABASE_NAME`` or ``EMAIL_HOST``, instead of
modifying the ``production.py`` file as we've done below.
-__ https://docs.djangoproject.com/en/1.11/ref/settings/
+__ https://docs.djangoproject.com/en/2.2/ref/settings/
Databases
^^^^^^^^^
ALLOWED_HOSTS = ('.example.com', )
-__ https://docs.djangoproject.com/en/1.11/ref/settings/#allowed-hosts
+__ https://docs.djangoproject.com/en/2.2/ref/settings/#allowed-hosts
Create systemd Unit File
~~~~~~~~~~~~~~~~~~~~~~~~
For more information on migrations, refer to `the Django documentation`__.
-__ https://docs.djangoproject.com/en/1.11/topics/migrations/
+__ https://docs.djangoproject.com/en/2.2/topics/migrations/
supported`__. You will find some tests provided by Patchwork fail and some
patches you develop may fail in production due to these differences.
-__ https://docs.djangoproject.com/en/1.11/ref/databases/
+__ https://docs.djangoproject.com/en/2.2/ref/databases/
__ https://www.sqlite.org/faq.html#q18
Example Installation
#
# Core settings
-# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/2.2/ref/settings/#core-settings
#
INSTALLED_APPS = [
#
# Auth settings
-# https://docs.djangoproject.com/en/1.11/ref/settings/#auth
+# https://docs.djangoproject.com/en/2.2/ref/settings/#auth
#
LOGIN_URL = 'auth_login'
#
# Sites settings
-# https://docs.djangoproject.com/en/1.11/ref/settings/#sites
+# https://docs.djangoproject.com/en/2.2/ref/settings/#sites
#
SITE_ID = 1
#
# Static files settings
-# https://docs.djangoproject.com/en/1.11/ref/settings/#static-files
+# https://docs.djangoproject.com/en/2.2/ref/settings/#static-files
#
STATIC_URL = '/static/'
#
# Core settings
-# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/2.2/ref/settings/#core-settings
#
ADMINS = (
#
# Auth settings
-# https://docs.djangoproject.com/en/1.11/ref/settings/#auth
+# https://docs.djangoproject.com/en/2.2/ref/settings/#auth
#
# Use a faster, though less secure, password hasher for faster tests
-# https://docs.djangoproject.com/es/1.11/topics/testing/overview/#password-hashing
+# https://docs.djangoproject.com/en/2.2/topics/testing/overview/#password-hashing
PASSWORD_HASHERS = ['django.contrib.auth.hashers.MD5PasswordHasher']
#
#
# Core settings
-# https://docs.djangoproject.com/en/1.11/ref/settings/#core-settings
+# https://docs.djangoproject.com/en/2.2/ref/settings/#core-settings
#
# Security
#
# If you're using a postgres database, connecting over a local unix-domain
# socket, then the following setting should work for you. Otherwise,
-# see https://docs.djangoproject.com/en/1.11/ref/settings/#databases
+# see https://docs.djangoproject.com/en/2.2/ref/settings/#databases
DATABASES = {
'default': {
#
# Static files settings
-# https://docs.djangoproject.com/en/1.11/ref/settings/#static-files
-# https://docs.djangoproject.com/en/1.11/ref/contrib/staticfiles/#manifeststaticfilesstorage
+# https://docs.djangoproject.com/en/2.2/ref/settings/#static-files
+# https://docs.djangoproject.com/en/2.2/ref/contrib/staticfiles/#manifeststaticfilesstorage
#
STATIC_ROOT = os.environ.get('STATIC_ROOT', '/srv/patchwork/htdocs/static')