Repository: pydanny/cookiecutter-djangopackage

Issue:
Add django 2.1 to the available version options
* Date you used Cookiecutter DjangoPackage: 08/17/2018
* Cookiecutter version used, if known: 1.6.0
* Python version: 2.7
* Operating System: Mac OS Mojave (Beta)

### Description

I tried to enter Django 2.1 as a valid version for my package. The cookiecutter failed. Since Django 2.1 has now been released, this should not occur.

### What I Did

```sh
...
django_versions [1.11,2.0]: 1.11,2.0,2.1
...
ERROR:pre_gen_project:Invalid Django version "2.1".
ERROR: Stopping generation because pre_gen_project hook script didn't exit successfully
Hook script failed (exit status: 1)
```



Discussion:
I might be wrong, but it seems to me this is caused by the fact that Python 2.7 is no longer supported in Django 2 (see [here](https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django) and [here](https://www.twoscoopspress.com/pages/two-scoops-of-django-1-11-faq#what-about-django-1-9-2-0-etc)).

Either upgrading to Python 3.x or selecting Django version 1.11 should fix the problem.
Thanks for the update. Actually, this issue still occurs when I use Python 3. The line responsible is here: https://github.com/pydanny/cookiecutter-djangopackage/blob/master/cookiecutter.json#L11
I could add a PR, but not sure if this repo is still actively maintained.
Judging from the commit activity, it seems the project is slightly unmaintained, but personally I think it still works as a nice starting point for a Django Package.

Regarding the issue, I tried the following input:
```
full_name [Your full name here]: Francis Brito
email [you@example.com]: francis@xprs.co
github_username [yourname]: francisbrito
project_name [Django Package]: 
repo_name [dj-package]: 
app_name [dj_package]: 
app_config_name [DjPackageConfig]: 
project_short_description [Your project description goes here]: 
models [Comma-separated list of models]: 
django_versions [1.11,2.0]: 1.11,2.0,2.1
version [0.1.0]: 
create_example_project [N]: 
Select open_source_license:
1 - MIT
2 - BSD
3 - ISCL
4 - Apache Software License 2.0
5 - Not open source
Choose from 1, 2, 3, 4, 5 (1, 2, 3, 4, 5) [1]: 1
```
With versions:
```
python --version
Python 3.6.6

cookiecutter --version
Cookiecutter 1.6.0 from <redacted> (Python 3.6)

pipenv --version
pipenv, version 2018.10.13
```

And the packaged seemed to work correctly (or at least no errors were thrown). Also tried with `django_versions [1.11,2.0]: 2.1` and worked too. 

There is [this commit](https://github.com/pydanny/cookiecutter-djangopackage/commit/5e2fefb0fc9586704bc511aa743653244b0cd2bb)  that was pushed some time after this issue was created. Could it be it fixed it? 

You're right. It was fixed there, but just never made it as a listed option in the cookiecutter

Resolving patch:
diff --git a/{{cookiecutter.repo_name}}/setup.py b/{{cookiecutter.repo_name}}/setup.py
--- a/{{cookiecutter.repo_name}}/setup.py
+++ b/{{cookiecutter.repo_name}}/setup.py
@@ -72,7 +72,8 @@ def get_version(*file_paths):
     classifiers=[
         'Development Status :: 3 - Alpha',{% if '1.11' in cookiecutter.django_versions %}
         'Framework :: Django :: 1.11',{% endif %}{% if '2.0' in cookiecutter.django_versions %}
-        'Framework :: Django :: 2.0',{% endif %}
+        'Framework :: Django :: 2.0',{% endif %}{% if '2.1' in cookiecutter.django_versions %}
+        'Framework :: Django :: 2.1',{% endif %}
         'Intended Audience :: Developers',
         'License :: OSI Approved :: BSD License',
         'Natural Language :: English',


Test patch:
diff --git a/tests/test_bake_project.py b/tests/test_bake_project.py
--- a/tests/test_bake_project.py
+++ b/tests/test_bake_project.py
@@ -183,16 +183,21 @@ def test_django_versions_default(cookies):
         tox_text = tox_file.read()
         assert "{py27,py35,py36}-django-111" in tox_text
         assert "{py35,py36}-django-20" in tox_text
+        assert "{py35,py36,py37}-django-21" in tox_text
         travis_file = result.project.join('.travis.yml')
         travis_text = travis_file.read()
         assert 'py35-django-111' in travis_text
         assert 'py36-django-111' in travis_text
         assert 'py35-django-20' in travis_text
         assert 'py36-django-20' in travis_text
+        assert 'py35-django-21' in travis_text
+        assert 'py36-django-21' in travis_text
+        assert 'py37-django-21' in travis_text
         setup_file = result.project.join('setup.py')
         setup_text = setup_file.read()
         assert "'Framework :: Django :: 1.11'," in setup_text
         assert "'Framework :: Django :: 2.0'," in setup_text
+        assert "'Framework :: Django :: 2.1'," in setup_text
         assert "'Programming Language :: Python :: 2'," in setup_text
         assert "'Programming Language :: Python :: 2.7'," in setup_text
         assert "'Programming Language :: Python :: 3'," in setup_text
@@ -205,7 +210,7 @@ def test_new_django_versions(cookies):
     Test case to assert that the tox.ini & setup.py files are generated with correct versions with a new Django version
     """
 
-    extra_context = {'django_versions': '1.11,2.0'}
+    extra_context = {'django_versions': '1.11,2.0,2.1'}
     with bake_in_temp_dir(cookies, extra_context=extra_context) as result:
 
         tox_file = result.project.join('tox.ini')
@@ -219,6 +224,7 @@ def test_new_django_versions(cookies):
         assert 'django19' not in travis_text
         setup_file = result.project.join('setup.py')
         setup_text = setup_file.read()
+        assert "'Framework :: Django :: 2.1'," in setup_text
         assert "'Framework :: Django :: 2.0'," in setup_text
         assert "'Framework :: Django :: 1.11'," in setup_text
         assert "'Framework :: Django :: 1.9'," not in setup_text