postgresql versions are now selectable

This commit is contained in:
Burhan Khalid 2016-08-10 18:31:48 +03:00
parent 6731886a4f
commit 716c179a03
5 changed files with 21 additions and 3 deletions

View File

@ -2,6 +2,11 @@
All enhancements and patches to Cookiecutter Django will be documented in this file. All enhancements and patches to Cookiecutter Django will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/). This project adheres to [Semantic Versioning](http://semver.org/).
##[2016-08-10]
## Added
- PostgreSQL versions are now selectable, instead of defaulting to 9.5; the minimum version is 9.2, which is supported by [Heroku](https://devcenter.heroku.com/articles/heroku-postgresql#version-support-and-legacy-infrastructure) and Django (@burhan)
- Fixed minor issue in the README.rst (@burhan)
##[2016-08-03] ##[2016-08-03]
## Changed ## Changed
- Upgrade to Bootstrap 4 Alpha 3 and its dependencies, including jQuery (@audreyr) - Upgrade to Bootstrap 4 Alpha 3 and its dependencies, including jQuery (@audreyr)

View File

@ -41,6 +41,7 @@ Features
* Instructions for deploying to PythonAnywhere_ * Instructions for deploying to PythonAnywhere_
* Works with Python 2.7.x or 3.5.x * Works with Python 2.7.x or 3.5.x
* Run tests with unittest or py.test * Run tests with unittest or py.test
* Customizable PostgreSQL version
Optional Integrations Optional Integrations
@ -76,7 +77,7 @@ Constraints
----------- -----------
* Only maintained 3rd party libraries are used. * Only maintained 3rd party libraries are used.
* Uses PostgreSQL everywhere (9.0+) * Uses PostgreSQL everywhere (9.2+)
* Environment variables for configuration (This won't work with Apache/mod_wsgi). * Environment variables for configuration (This won't work with Apache/mod_wsgi).
@ -125,6 +126,12 @@ Answer the prompts with your own desired options_. For example::
use_docker [y]: n use_docker [y]: n
use_heroku [n]: y use_heroku [n]: y
use_compressor [n]: y use_compressor [n]: y
Select postgresql_version:
1 - 9.2
2 - 9.3
3 - 9.4
4 - 9.5
Choose from 1, 2, 3, 4 [1]: 1
Select js_task_runner: Select js_task_runner:
1 - Gulp 1 - Gulp
2 - Grunt 2 - Grunt

View File

@ -18,6 +18,7 @@
"use_docker": "y", "use_docker": "y",
"use_heroku": "n", "use_heroku": "n",
"use_compressor": "n", "use_compressor": "n",
"postgresql_version": ["9.2", "9.3", "9.4", "9.5"],
"js_task_runner": ["Gulp", "Grunt", "Webpack", "None"], "js_task_runner": ["Gulp", "Grunt", "Webpack", "None"],
"use_lets_encrypt": "n", "use_lets_encrypt": "n",
"open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"] "open_source_license": ["MIT", "BSD", "GPLv3", "Apache Software License 2.0", "Not open source"]

View File

@ -27,7 +27,12 @@
"postdeploy": "python manage.py migrate" "postdeploy": "python manage.py migrate"
}, },
"addons": [ "addons": [
"heroku-postgresql:hobby-dev", {
"plan": "heroku-postgresql:hobby-dev",
"options": {
"version": "{{ cookiecutter.postgresql_version }}"
}
},
"heroku-redis:hobby-dev", "heroku-redis:hobby-dev",
"mailgun" "mailgun"
] ]

View File

@ -1,4 +1,4 @@
FROM postgres:9.5 FROM postgres:{{ cookiecutter.postgresql_version }}
# add backup scripts # add backup scripts
ADD backup.sh /usr/local/bin/backup ADD backup.sh /usr/local/bin/backup