From 23bd99fc5a74b83ced0755b5f52980782177a7f7 Mon Sep 17 00:00:00 2001 From: Shupeyko Nikita Date: Fri, 21 Apr 2017 20:44:06 +0300 Subject: [PATCH 1/3] Pin redis service image version (#1117) --- {{cookiecutter.project_slug}}/docker-compose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/docker-compose.yml b/{{cookiecutter.project_slug}}/docker-compose.yml index e4997f55..f0c48406 100644 --- a/{{cookiecutter.project_slug}}/docker-compose.yml +++ b/{{cookiecutter.project_slug}}/docker-compose.yml @@ -57,7 +57,7 @@ services: {% endif %} redis: - image: redis:latest + image: redis:3.0 {% if cookiecutter.use_celery == 'y' %} celeryworker: build: From 6aced9ba73ad09edd7ce3612aff39a4b0aff3447 Mon Sep 17 00:00:00 2001 From: Daniel Roy Greenfeld Date: Fri, 21 Apr 2017 12:31:45 -0700 Subject: [PATCH 2/3] Remove Python 2.7 support per #1129 (#1130) * Remove Python 2.7 support per * Remove Python 2.7 references * Remove Python 2.7 references * remove python 2 entirely --- .travis.yml | 1 - CONTRIBUTING.rst | 4 ++-- README.rst | 6 ++---- cookiecutter.json | 1 - docs/conf.py | 4 ---- docs/deployment-on-pythonanywhere.rst | 2 +- docs/project-generation-options.rst | 4 ---- hooks/post_gen_project.py | 1 - setup.py | 2 -- tests/test_cookiecutter_generation.py | 2 -- tox.ini | 2 +- {{cookiecutter.project_slug}}/.travis.yml | 4 ---- .../compose/django/Dockerfile | 4 ---- .../compose/django/Dockerfile-dev | 4 ---- .../config/settings/__init__.py | 1 - .../config/settings/base.py | 3 --- .../config/settings/local.py | 1 - .../config/settings/production.py | 7 ++----- .../config/settings/test.py | 1 - {{cookiecutter.project_slug}}/config/urls.py | 3 --- {{cookiecutter.project_slug}}/docs/conf.py | 4 ---- {{cookiecutter.project_slug}}/requirements/base.txt | 3 +-- {{cookiecutter.project_slug}}/runtime.txt | 2 +- .../utility/install_python_dependencies.sh | 13 ------------- .../utility/requirements-jessie.apt | 4 ---- .../utility/requirements-trusty.apt | 5 ----- .../utility/requirements-xenial.apt | 5 ----- .../{{cookiecutter.project_slug}}/__init__.py | 1 - .../contrib/__init__.py | 1 - .../contrib/sites/__init__.py | 1 - .../contrib/sites/migrations/0001_initial.py | 3 --- .../sites/migrations/0002_alter_domain_unique.py | 3 --- .../migrations/0003_set_site_domain_and_name.py | 4 ---- .../contrib/sites/migrations/__init__.py | 1 - .../{{cookiecutter.project_slug}}/taskapp/celery.py | 3 +-- .../{{cookiecutter.project_slug}}/users/__init__.py | 2 +- .../{{cookiecutter.project_slug}}/users/adapters.py | 1 - .../{{cookiecutter.project_slug}}/users/admin.py | 3 --- .../users/migrations/0001_initial.py | 4 ---- .../{{cookiecutter.project_slug}}/users/models.py | 3 --- .../{{cookiecutter.project_slug}}/users/urls.py | 3 --- .../{{cookiecutter.project_slug}}/users/views.py | 3 --- 42 files changed, 12 insertions(+), 117 deletions(-) diff --git a/.travis.yml b/.travis.yml index f4a2e41c..8ca40c77 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,6 @@ language: python python: 3.5 env: - - TOX_ENV=py27 - TOX_ENV=py34 - TOX_ENV=py35 diff --git a/CONTRIBUTING.rst b/CONTRIBUTING.rst index 9acc8328..efff1fad 100644 --- a/CONTRIBUTING.rst +++ b/CONTRIBUTING.rst @@ -39,9 +39,9 @@ To run all tests using various versions of python in virtualenvs defined in tox. It is possible to tests with some versions of python, to do this the command is:: - $ tox -e py27,py34 + $ tox -e py34,py35 -Will run py.test with the python2.7, and python3.4 interpreters, for +Will run py.test with the python3.4, and python3.5 interpreters, for example. To run a particular test with tox for against your current Python version:: diff --git a/README.rst b/README.rst index 2648aeac..68d6088d 100644 --- a/README.rst +++ b/README.rst @@ -29,8 +29,9 @@ Features --------- * For Django 1.10 +* Works with Python 3.4.x or 3.5.x. Python 3.6 is experimenta * Renders Django projects with 100% starting test coverage -* Twitter Bootstrap_ v4.0.0 - `alpha 4`_ (`maintained Foundation fork`_ also available) +* Twitter Bootstrap_ v4.0.0 - alpha 6 (`maintained Foundation fork`_ also available) * 12-Factor_ based settings via django-environ_ * Secure by default. We believe in SSL. * Optimized development and production settings @@ -42,7 +43,6 @@ Features * Docker support using docker-compose_ for development and production * Procfile_ for deploying to Heroku * Instructions for deploying to PythonAnywhere_ -* Works with Python 2.7.x or 3.5.x * Run tests with unittest or py.test * Customizable PostgreSQL version * Experimental support for Amazon Elastic Beanstalk @@ -61,7 +61,6 @@ Optional Integrations * Integration with Sentry_ for error logging * Integration with Opbeat_ for performance monitoring -.. _`alpha 4`: http://blog.getbootstrap.com/2016/09/05/bootstrap-4-alpha-4/ .. _Bootstrap: https://github.com/twbs/bootstrap .. _django-environ: https://github.com/joke2k/django-environ .. _12-Factor: http://12factor.net/ @@ -128,7 +127,6 @@ Answer the prompts with your own desired options_. For example:: use_opbeat [n]: y use_pycharm [n]: y windows [n]: n - use_python3 [y]: y use_docker [y]: n use_heroku [n]: y use_compressor [n]: y diff --git a/cookiecutter.json b/cookiecutter.json index 0bc2b90e..4450e693 100644 --- a/cookiecutter.json +++ b/cookiecutter.json @@ -14,7 +14,6 @@ "use_opbeat": "n", "use_pycharm": "n", "windows": "n", - "use_python3": "y", "use_docker": "n", "use_heroku": "n", "use_elasticbeanstalk_experimental": "n", diff --git a/docs/conf.py b/docs/conf.py index 293d0fc1..f8810ca7 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # cookiecutter-django documentation build configuration file. # # This file is execfile()d with the current directory set to its containing dir. @@ -10,8 +8,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -from __future__ import unicode_literals - from datetime import datetime import os import sys diff --git a/docs/deployment-on-pythonanywhere.rst b/docs/deployment-on-pythonanywhere.rst index 66117072..07b46bc0 100644 --- a/docs/deployment-on-pythonanywhere.rst +++ b/docs/deployment-on-pythonanywhere.rst @@ -35,7 +35,7 @@ Make sure your project is fully commited and pushed up to Bitbucket or Github or git clone # you can also use hg cd my-project-name - mkvirtualenv --python=/usr/bin/python3.5 my-project-name # or python2.7, etc + mkvirtualenv --python=/usr/bin/python3.5 my-project-name pip install -r requirements/production.txt # may take a few minutes diff --git a/docs/project-generation-options.rst b/docs/project-generation-options.rst index 835d40f2..5ada6a3f 100644 --- a/docs/project-generation-options.rst +++ b/docs/project-generation-options.rst @@ -54,10 +54,6 @@ use_pycharm [n] windows [n] Whether you'll be developing on Windows. -use_python3 [y] - By default, the Python code generated will be for Python 3.x. But if you - answer `n` here, it will be legacy Python 2.7 code. - use_docker [y] Whether to use Docker_, separating the app and database into separate containers. diff --git a/hooks/post_gen_project.py b/hooks/post_gen_project.py index 4a9d14e2..ba54a5a4 100644 --- a/hooks/post_gen_project.py +++ b/hooks/post_gen_project.py @@ -12,7 +12,6 @@ A portion of this code was adopted from Django's standard crypto functions and utilities, specifically: https://github.com/django/django/blob/master/django/utils/crypto.py """ -from __future__ import print_function import os import random import shutil diff --git a/setup.py b/setup.py index 13749203..6dc6635e 100644 --- a/setup.py +++ b/setup.py @@ -39,8 +39,6 @@ setup( 'Natural Language :: English', 'License :: OSI Approved :: BSD License', 'Programming Language :: Python', - 'Programming Language :: Python :: 2', - 'Programming Language :: Python :: 2.7', 'Programming Language :: Python :: 3', 'Programming Language :: Python :: 3.4', 'Programming Language :: Python :: 3.5', diff --git a/tests/test_cookiecutter_generation.py b/tests/test_cookiecutter_generation.py index e0e06ce6..acbc2c09 100755 --- a/tests/test_cookiecutter_generation.py +++ b/tests/test_cookiecutter_generation.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- - import os import re import sh diff --git a/tox.ini b/tox.ini index d2cfed18..311d80f4 100644 --- a/tox.ini +++ b/tox.ini @@ -1,6 +1,6 @@ [tox] skipsdist = true -envlist = py27,py34,py35 +envlist = py34,py35 [testenv] passenv = LC_ALL, LANG, HOME diff --git a/{{cookiecutter.project_slug}}/.travis.yml b/{{cookiecutter.project_slug}}/.travis.yml index 4001cbe3..216b8709 100644 --- a/{{cookiecutter.project_slug}}/.travis.yml +++ b/{{cookiecutter.project_slug}}/.travis.yml @@ -8,8 +8,4 @@ before_install: - sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm language: python python: -{% if cookiecutter.use_python3 == 'y' -%} - "3.5" -{% else %} - - "2.7" -{%- endif %} diff --git a/{{cookiecutter.project_slug}}/compose/django/Dockerfile b/{{cookiecutter.project_slug}}/compose/django/Dockerfile index 91c2297d..fdccf7f5 100644 --- a/{{cookiecutter.project_slug}}/compose/django/Dockerfile +++ b/{{cookiecutter.project_slug}}/compose/django/Dockerfile @@ -1,8 +1,4 @@ -{% if cookiecutter.use_python3 == 'y' -%} FROM python:3.5 -{% else %} -FROM python:2.7 -{%- endif %} ENV PYTHONUNBUFFERED 1 # Requirements have to be pulled and installed here, otherwise caching won't work diff --git a/{{cookiecutter.project_slug}}/compose/django/Dockerfile-dev b/{{cookiecutter.project_slug}}/compose/django/Dockerfile-dev index 3390aa09..673a0640 100644 --- a/{{cookiecutter.project_slug}}/compose/django/Dockerfile-dev +++ b/{{cookiecutter.project_slug}}/compose/django/Dockerfile-dev @@ -1,8 +1,4 @@ -{% if cookiecutter.use_python3 == 'y' -%} FROM python:3.5 -{% else %} -FROM python:2.7 -{%- endif %} ENV PYTHONUNBUFFERED 1 # Requirements have to be pulled and installed here, otherwise caching won't work diff --git a/{{cookiecutter.project_slug}}/config/settings/__init__.py b/{{cookiecutter.project_slug}}/config/settings/__init__.py index 40a96afc..e69de29b 100644 --- a/{{cookiecutter.project_slug}}/config/settings/__init__.py +++ b/{{cookiecutter.project_slug}}/config/settings/__init__.py @@ -1 +0,0 @@ -# -*- coding: utf-8 -*- diff --git a/{{cookiecutter.project_slug}}/config/settings/base.py b/{{cookiecutter.project_slug}}/config/settings/base.py index 3ff7e109..14a6f0a3 100644 --- a/{{cookiecutter.project_slug}}/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/config/settings/base.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Django settings for {{cookiecutter.project_name}} project. @@ -8,8 +7,6 @@ https://docs.djangoproject.com/en/dev/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/dev/ref/settings/ """ -from __future__ import absolute_import, unicode_literals - import environ ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config/settings/base.py - 3 = {{ cookiecutter.project_slug }}/) diff --git a/{{cookiecutter.project_slug}}/config/settings/local.py b/{{cookiecutter.project_slug}}/config/settings/local.py index fc00cd00..ff21678c 100644 --- a/{{cookiecutter.project_slug}}/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/config/settings/local.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Local settings diff --git a/{{cookiecutter.project_slug}}/config/settings/production.py b/{{cookiecutter.project_slug}}/config/settings/production.py index 1763096d..ca79c163 100644 --- a/{{cookiecutter.project_slug}}/config/settings/production.py +++ b/{{cookiecutter.project_slug}}/config/settings/production.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- """ Production Configurations @@ -12,10 +11,8 @@ Production Configurations - Use opbeat for error reporting {% endif %} """ -from __future__ import absolute_import, unicode_literals from boto.s3.connection import OrdinaryCallingFormat -from django.utils import six {% if cookiecutter.use_sentry_for_error_reporting == 'y' %} import logging {% endif %} @@ -109,9 +106,9 @@ AWS_EXPIRY = 60 * 60 * 24 * 7 # TODO See: https://github.com/jschneier/django-storages/issues/47 # Revert the following and use str after the above-mentioned bug is fixed in # either django-storage-redux or boto +control = 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIRY, AWS_EXPIRY) AWS_HEADERS = { - 'Cache-Control': six.b('max-age=%d, s-maxage=%d, must-revalidate' % ( - AWS_EXPIRY, AWS_EXPIRY)) + 'Cache-Control': bytes(control, encoding='latin-1') } # URL that handles the media served from MEDIA_ROOT, used for managing diff --git a/{{cookiecutter.project_slug}}/config/settings/test.py b/{{cookiecutter.project_slug}}/config/settings/test.py index 4f061f71..0cd3e665 100644 --- a/{{cookiecutter.project_slug}}/config/settings/test.py +++ b/{{cookiecutter.project_slug}}/config/settings/test.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- ''' Test settings diff --git a/{{cookiecutter.project_slug}}/config/urls.py b/{{cookiecutter.project_slug}}/config/urls.py index 32171c03..930d210e 100644 --- a/{{cookiecutter.project_slug}}/config/urls.py +++ b/{{cookiecutter.project_slug}}/config/urls.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - from django.conf import settings from django.conf.urls import include, url from django.conf.urls.static import static diff --git a/{{cookiecutter.project_slug}}/docs/conf.py b/{{cookiecutter.project_slug}}/docs/conf.py index 03cbe319..80c45032 100644 --- a/{{cookiecutter.project_slug}}/docs/conf.py +++ b/{{cookiecutter.project_slug}}/docs/conf.py @@ -1,5 +1,3 @@ -# -*- coding: utf-8 -*- -# # {{ cookiecutter.project_name }} documentation build configuration file, created by # sphinx-quickstart. # @@ -11,8 +9,6 @@ # All configuration values have a default; values that are commented out # serve to show the default. -from __future__ import unicode_literals - import os import sys diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 6eb09c94..4ab0d9b4 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,10 +1,9 @@ -{% if cookiecutter.use_python3 == 'y' -%} # Wheel 0.25+ needed to install certain packages on CPython 3.5+ # like Pillow and psycopg2 # See http://bitly.com/wheel-building-fails-CPython-35 # Verified bug on Python 3.5.1 wheel==0.29.0 -{%- endif %} + # Bleeding edge Django django==1.10.7 # pyup: >=1.10,<1.11 diff --git a/{{cookiecutter.project_slug}}/runtime.txt b/{{cookiecutter.project_slug}}/runtime.txt index e16ddff2..5486d7ad 100644 --- a/{{cookiecutter.project_slug}}/runtime.txt +++ b/{{cookiecutter.project_slug}}/runtime.txt @@ -1 +1 @@ -{% if cookiecutter.use_python3 == 'y' -%}python-3.5.3{% else %}python-2.7.10{%- endif %} +python-3.5.3 diff --git a/{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh b/{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh index 074bc192..c28b5b89 100755 --- a/{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh +++ b/{{cookiecutter.project_slug}}/utility/install_python_dependencies.sh @@ -6,11 +6,7 @@ PROJECT_DIR="$(dirname "$WORK_DIR")" pip --version >/dev/null 2>&1 || { echo >&2 -e "\npip is required but it's not installed." echo >&2 -e "You can install it by running the following command:\n" -{% if cookiecutter.use_python3 == 'y' -%} echo >&2 "wget https://bootstrap.pypa.io/get-pip.py --output-document=get-pip.py; chmod +x get-pip.py; sudo -H python3 get-pip.py" -{% else %} - echo >&2 "wget https://bootstrap.pypa.io/get-pip.py --output-document=get-pip.py; chmod +x get-pip.py; sudo -H python2 get-pip.py" -{%- endif %} echo >&2 -e "\n" echo >&2 -e "\nFor more information, see pip documentation: https://pip.pypa.io/en/latest/" exit 1; @@ -19,11 +15,7 @@ pip --version >/dev/null 2>&1 || { virtualenv --version >/dev/null 2>&1 || { echo >&2 -e "\nvirtualenv is required but it's not installed." echo >&2 -e "You can install it by running the following command:\n" -{% if cookiecutter.use_python3 == 'y' -%} echo >&2 "sudo -H pip3 install virtualenv" -{% else %} - echo >&2 "sudo -H pip2 install virtualenv" -{%- endif %} echo >&2 -e "\n" echo >&2 -e "\nFor more information, see virtualenv documentation: https://virtualenv.pypa.io/en/latest/" exit 1; @@ -32,11 +24,7 @@ virtualenv --version >/dev/null 2>&1 || { if [ -z "$VIRTUAL_ENV" ]; then echo >&2 -e "\nYou need activate a virtualenv first" echo >&2 -e 'If you do not have a virtualenv created, run the following command to create and automatically activate a new virtualenv named "venv" on current folder:\n' -{% if cookiecutter.use_python3 == 'y' -%} echo >&2 -e "virtualenv venv --python=\`which python3\`" -{% else %} - echo >&2 -e "virtualenv venv --python=\`which python2\`" -{%- endif %} echo >&2 -e "\nTo leave/disable the currently active virtualenv, run the following command:\n" echo >&2 "deactivate" echo >&2 -e "\nTo activate the virtualenv again, run the following command:\n" @@ -52,4 +40,3 @@ else pip install -r $PROJECT_DIR/requirements.txt {%- endif %} fi - diff --git a/{{cookiecutter.project_slug}}/utility/requirements-jessie.apt b/{{cookiecutter.project_slug}}/utility/requirements-jessie.apt index ba7efc3f..5c49365b 100644 --- a/{{cookiecutter.project_slug}}/utility/requirements-jessie.apt +++ b/{{cookiecutter.project_slug}}/utility/requirements-jessie.apt @@ -3,11 +3,7 @@ build-essential #required to translate gettext -{% if cookiecutter.use_python3 == 'y' -%} python3-dev -{% else %} -python-dev -{%- endif %} ##shared dependencies of: ##Pillow, pylibmc diff --git a/{{cookiecutter.project_slug}}/utility/requirements-trusty.apt b/{{cookiecutter.project_slug}}/utility/requirements-trusty.apt index 966e9576..455f1a86 100644 --- a/{{cookiecutter.project_slug}}/utility/requirements-trusty.apt +++ b/{{cookiecutter.project_slug}}/utility/requirements-trusty.apt @@ -3,11 +3,7 @@ build-essential #required to translate gettext -{% if cookiecutter.use_python3 == 'y' -%} python3-dev -{% else %} -python-dev -{%- endif %} ##shared dependencies of: ##Pillow, pylibmc @@ -25,4 +21,3 @@ libwebp-dev ##django-extensions graphviz-dev - diff --git a/{{cookiecutter.project_slug}}/utility/requirements-xenial.apt b/{{cookiecutter.project_slug}}/utility/requirements-xenial.apt index 157bdf20..ba84ef16 100644 --- a/{{cookiecutter.project_slug}}/utility/requirements-xenial.apt +++ b/{{cookiecutter.project_slug}}/utility/requirements-xenial.apt @@ -3,11 +3,7 @@ build-essential #required to translate gettext -{% if cookiecutter.use_python3 == 'y' -%} python3-dev -{% else %} -python-dev -{%- endif %} ##shared dependencies of: ##Pillow, pylibmc @@ -25,4 +21,3 @@ libwebp-dev ##django-extensions graphviz-dev - diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__init__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__init__.py index ebc6a5e1..14a422a2 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__init__.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/__init__.py @@ -1,3 +1,2 @@ -# -*- coding: utf-8 -*- __version__ = '{{ cookiecutter.version }}' __version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')]) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/__init__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/__init__.py index 776ac171..1c7ecc89 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/__init__.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/__init__.py @@ -3,4 +3,3 @@ To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """ -# -*- coding: utf-8 -*- diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/__init__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/__init__.py index 776ac171..1c7ecc89 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/__init__.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/__init__.py @@ -3,4 +3,3 @@ To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """ -# -*- coding: utf-8 -*- diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py index b1803682..a7639869 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0001_initial.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import django.contrib.sites.models from django.contrib.sites.models import _simple_domain_name_validator from django.db import migrations, models diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py index 468718cd..6a26ebcd 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0002_alter_domain_unique.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals - import django.contrib.sites.models from django.db import migrations, models diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py index 348989e1..05a47ba4 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/0003_set_site_domain_and_name.py @@ -3,10 +3,6 @@ To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """ -# -*- coding: utf-8 -*- - -from __future__ import unicode_literals - from django.conf import settings from django.db import migrations diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/__init__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/__init__.py index 776ac171..1c7ecc89 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/__init__.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/contrib/sites/migrations/__init__.py @@ -3,4 +3,3 @@ To understand why this file is here, please read: http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django """ -# -*- coding: utf-8 -*- diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py index bea9768a..72513ed3 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/taskapp/celery.py @@ -1,5 +1,4 @@ {% if cookiecutter.use_celery == 'y' %} -from __future__ import absolute_import import os from celery import Celery from django.apps import apps, AppConfig @@ -31,7 +30,7 @@ class CeleryConfig(AppConfig): {% if cookiecutter.use_pycharm == 'y' -%} # Since raven is required in production only, # imports might (most surely will) be wiped out - # during PyCharm code clean up started + # during PyCharm code clean up started # in other environments. # @formatter:off {%- endif %} diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/__init__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/__init__.py index 40a96afc..8b137891 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/__init__.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/__init__.py @@ -1 +1 @@ -# -*- coding: utf-8 -*- + diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py index ce8a159d..b31450ae 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/adapters.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- from django.conf import settings from allauth.account.adapter import DefaultAccountAdapter from allauth.socialaccount.adapter import DefaultSocialAccountAdapter diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py index ce6d8e13..9b615121 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/admin.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals - from django import forms from django.contrib import admin from django.contrib.auth.admin import UserAdmin as AuthUserAdmin diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py index e76c333f..b2cfca39 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/migrations/0001_initial.py @@ -1,7 +1,3 @@ -# -*- coding: utf-8 -*- -# Generated by Django 1.10.1 on 2016-09-23 04:36 -from __future__ import unicode_literals - import django.contrib.auth.models import django.contrib.auth.validators from django.db import migrations, models diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py index 0beebfb1..c06f15da 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/models.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import unicode_literals, absolute_import - from django.contrib.auth.models import AbstractUser from django.core.urlresolvers import reverse from django.db import models diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/urls.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/urls.py index 6ae4b6fa..600ccfbd 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/urls.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/urls.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals - from django.conf.urls import url from . import views diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py index 4cfe64a3..777f42b7 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py @@ -1,6 +1,3 @@ -# -*- coding: utf-8 -*- -from __future__ import absolute_import, unicode_literals - from django.core.urlresolvers import reverse from django.views.generic import DetailView, ListView, RedirectView, UpdateView From e78b6fb4255bc6eedd19211a095e458605a40944 Mon Sep 17 00:00:00 2001 From: Shupeyko Nikita Date: Sun, 23 Apr 2017 01:27:58 +0300 Subject: [PATCH 3/3] Fix W391 blank line at end of file (#1136) --- .../{{cookiecutter.project_slug}}/users/__init__.py | 1 - 1 file changed, 1 deletion(-) diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/__init__.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/__init__.py index 8b137891..e69de29b 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/__init__.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/__init__.py @@ -1 +0,0 @@ -