mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-05 12:40:17 +03:00
Merge branch 'master' into setup-bumpversion
This commit is contained in:
commit
0c4e99a997
|
@ -10,7 +10,6 @@ language: python
|
||||||
python: 3.5
|
python: 3.5
|
||||||
|
|
||||||
env:
|
env:
|
||||||
- TOX_ENV=py27
|
|
||||||
- TOX_ENV=py34
|
- TOX_ENV=py34
|
||||||
- TOX_ENV=py35
|
- TOX_ENV=py35
|
||||||
|
|
||||||
|
|
|
@ -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
|
It is possible to tests with some versions of python, to do this the command
|
||||||
is::
|
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.
|
example.
|
||||||
|
|
||||||
To run a particular test with tox for against your current Python version::
|
To run a particular test with tox for against your current Python version::
|
||||||
|
|
|
@ -16,6 +16,7 @@ Fábio C. Barrionuevo da Luz `@luzfcb`_ @luzfcb
|
||||||
Saurabh Kumar `@theskumar`_ @_theskumar
|
Saurabh Kumar `@theskumar`_ @_theskumar
|
||||||
Jannis Gebauer `@jayfk`_
|
Jannis Gebauer `@jayfk`_
|
||||||
Burhan Khalid `@burhan`_ @burhan
|
Burhan Khalid `@burhan`_ @burhan
|
||||||
|
Shupeyko Nikita `@webyneter`_ @webyneter
|
||||||
=========================== ============= ===========
|
=========================== ============= ===========
|
||||||
|
|
||||||
*Audrey is also the creator of Cookiecutter. Audrey and
|
*Audrey is also the creator of Cookiecutter. Audrey and
|
||||||
|
@ -26,6 +27,7 @@ Daniel are on the Cookiecutter core team.*
|
||||||
.. _@theskumar: https://github.com/theskumar
|
.. _@theskumar: https://github.com/theskumar
|
||||||
.. _@audreyr: https://github.com/audreyr
|
.. _@audreyr: https://github.com/audreyr
|
||||||
.. _@jayfk: https://github.com/jayfk
|
.. _@jayfk: https://github.com/jayfk
|
||||||
|
.. _@webyneter: https://github.com/webyneter
|
||||||
|
|
||||||
Other Contributors
|
Other Contributors
|
||||||
------------------
|
------------------
|
||||||
|
|
|
@ -29,8 +29,9 @@ Features
|
||||||
---------
|
---------
|
||||||
|
|
||||||
* For Django 1.10
|
* 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
|
* 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_
|
* 12-Factor_ based settings via django-environ_
|
||||||
* Secure by default. We believe in SSL.
|
* Secure by default. We believe in SSL.
|
||||||
* Optimized development and production settings
|
* Optimized development and production settings
|
||||||
|
@ -42,7 +43,6 @@ Features
|
||||||
* Docker support using docker-compose_ for development and production
|
* Docker support using docker-compose_ for development and production
|
||||||
* Procfile_ for deploying to Heroku
|
* Procfile_ for deploying to Heroku
|
||||||
* Instructions for deploying to PythonAnywhere_
|
* Instructions for deploying to PythonAnywhere_
|
||||||
* 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
|
* Customizable PostgreSQL version
|
||||||
* Experimental support for Amazon Elastic Beanstalk
|
* Experimental support for Amazon Elastic Beanstalk
|
||||||
|
@ -61,7 +61,6 @@ Optional Integrations
|
||||||
* Integration with Sentry_ for error logging
|
* Integration with Sentry_ for error logging
|
||||||
* Integration with Opbeat_ for performance monitoring
|
* 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
|
.. _Bootstrap: https://github.com/twbs/bootstrap
|
||||||
.. _django-environ: https://github.com/joke2k/django-environ
|
.. _django-environ: https://github.com/joke2k/django-environ
|
||||||
.. _12-Factor: http://12factor.net/
|
.. _12-Factor: http://12factor.net/
|
||||||
|
@ -84,7 +83,7 @@ Constraints
|
||||||
|
|
||||||
* Only maintained 3rd party libraries are used.
|
* Only maintained 3rd party libraries are used.
|
||||||
* Uses PostgreSQL everywhere (9.2+)
|
* 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 except on AWS ELB).
|
||||||
|
|
||||||
|
|
||||||
Usage
|
Usage
|
||||||
|
@ -128,7 +127,6 @@ Answer the prompts with your own desired options_. For example::
|
||||||
use_opbeat [n]: y
|
use_opbeat [n]: y
|
||||||
use_pycharm [n]: y
|
use_pycharm [n]: y
|
||||||
windows [n]: n
|
windows [n]: n
|
||||||
use_python3 [y]: y
|
|
||||||
use_docker [y]: n
|
use_docker [y]: n
|
||||||
use_heroku [n]: y
|
use_heroku [n]: y
|
||||||
use_compressor [n]: y
|
use_compressor [n]: y
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
"use_opbeat": "n",
|
"use_opbeat": "n",
|
||||||
"use_pycharm": "n",
|
"use_pycharm": "n",
|
||||||
"windows": "n",
|
"windows": "n",
|
||||||
"use_python3": "y",
|
|
||||||
"use_docker": "n",
|
"use_docker": "n",
|
||||||
"use_heroku": "n",
|
"use_heroku": "n",
|
||||||
"use_elasticbeanstalk_experimental": "n",
|
"use_elasticbeanstalk_experimental": "n",
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# cookiecutter-django documentation build configuration file.
|
# cookiecutter-django documentation build configuration file.
|
||||||
#
|
#
|
||||||
# This file is execfile()d with the current directory set to its containing dir.
|
# 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
|
# All configuration values have a default; values that are commented out
|
||||||
# serve to show the default.
|
# serve to show the default.
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
|
@ -35,7 +35,7 @@ Make sure your project is fully commited and pushed up to Bitbucket or Github or
|
||||||
|
|
||||||
git clone <my-repo-url> # you can also use hg
|
git clone <my-repo-url> # you can also use hg
|
||||||
cd my-project-name
|
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
|
pip install -r requirements/production.txt # may take a few minutes
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -54,10 +54,6 @@ use_pycharm [n]
|
||||||
windows [n]
|
windows [n]
|
||||||
Whether you'll be developing on Windows.
|
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]
|
use_docker [y]
|
||||||
Whether to use Docker_, separating the app and database into separate
|
Whether to use Docker_, separating the app and database into separate
|
||||||
containers.
|
containers.
|
||||||
|
|
|
@ -12,7 +12,6 @@ A portion of this code was adopted from Django's standard crypto functions and
|
||||||
utilities, specifically:
|
utilities, specifically:
|
||||||
https://github.com/django/django/blob/master/django/utils/crypto.py
|
https://github.com/django/django/blob/master/django/utils/crypto.py
|
||||||
"""
|
"""
|
||||||
from __future__ import print_function
|
|
||||||
import os
|
import os
|
||||||
import random
|
import random
|
||||||
import shutil
|
import shutil
|
||||||
|
|
|
@ -7,5 +7,5 @@ binaryornot==0.4.3
|
||||||
pytest==3.0.7
|
pytest==3.0.7
|
||||||
pep8==1.7.0
|
pep8==1.7.0
|
||||||
pyflakes==1.5.0
|
pyflakes==1.5.0
|
||||||
tox==2.6.0
|
tox==2.7.0
|
||||||
pytest-cookies==0.2.0
|
pytest-cookies==0.2.0
|
||||||
|
|
4
setup.py
4
setup.py
|
@ -10,7 +10,7 @@ except ImportError:
|
||||||
|
|
||||||
# Our version ALWAYS matches the version of Django we support
|
# Our version ALWAYS matches the version of Django we support
|
||||||
# If Django has a new release, we branch, tag, then update this setting after the tag.
|
# If Django has a new release, we branch, tag, then update this setting after the tag.
|
||||||
version = '1.10.1'
|
version = '1.10.7'
|
||||||
|
|
||||||
if sys.argv[-1] == 'tag':
|
if sys.argv[-1] == 'tag':
|
||||||
os.system('git tag -a %s -m "version %s"' % (version, version))
|
os.system('git tag -a %s -m "version %s"' % (version, version))
|
||||||
|
@ -39,8 +39,6 @@ setup(
|
||||||
'Natural Language :: English',
|
'Natural Language :: English',
|
||||||
'License :: OSI Approved :: BSD License',
|
'License :: OSI Approved :: BSD License',
|
||||||
'Programming Language :: Python',
|
'Programming Language :: Python',
|
||||||
'Programming Language :: Python :: 2',
|
|
||||||
'Programming Language :: Python :: 2.7',
|
|
||||||
'Programming Language :: Python :: 3',
|
'Programming Language :: Python :: 3',
|
||||||
'Programming Language :: Python :: 3.4',
|
'Programming Language :: Python :: 3.4',
|
||||||
'Programming Language :: Python :: 3.5',
|
'Programming Language :: Python :: 3.5',
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import re
|
import re
|
||||||
import sh
|
import sh
|
||||||
|
|
2
tox.ini
2
tox.ini
|
@ -1,6 +1,6 @@
|
||||||
[tox]
|
[tox]
|
||||||
skipsdist = true
|
skipsdist = true
|
||||||
envlist = py27,py34,py35
|
envlist = py34,py35
|
||||||
|
|
||||||
[testenv]
|
[testenv]
|
||||||
passenv = LC_ALL, LANG, HOME
|
passenv = LC_ALL, LANG, HOME
|
||||||
|
|
|
@ -8,8 +8,4 @@ before_install:
|
||||||
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
|
- sudo apt-get install -qq libsqlite3-dev libxml2 libxml2-dev libssl-dev libbz2-dev wget curl llvm
|
||||||
language: python
|
language: python
|
||||||
python:
|
python:
|
||||||
{% if cookiecutter.use_python3 == 'y' -%}
|
|
||||||
- "3.5"
|
- "3.5"
|
||||||
{% else %}
|
|
||||||
- "2.7"
|
|
||||||
{%- endif %}
|
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{% if cookiecutter.use_python3 == 'y' -%}
|
|
||||||
FROM python:3.5
|
FROM python:3.5
|
||||||
{% else %}
|
|
||||||
FROM python:2.7
|
|
||||||
{%- endif %}
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
# Requirements have to be pulled and installed here, otherwise caching won't work
|
# Requirements have to be pulled and installed here, otherwise caching won't work
|
||||||
|
|
|
@ -1,8 +1,4 @@
|
||||||
{% if cookiecutter.use_python3 == 'y' -%}
|
|
||||||
FROM python:3.5
|
FROM python:3.5
|
||||||
{% else %}
|
|
||||||
FROM python:2.7
|
|
||||||
{%- endif %}
|
|
||||||
ENV PYTHONUNBUFFERED 1
|
ENV PYTHONUNBUFFERED 1
|
||||||
|
|
||||||
# Requirements have to be pulled and installed here, otherwise caching won't work
|
# Requirements have to be pulled and installed here, otherwise caching won't work
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
"""
|
||||||
Django settings for {{cookiecutter.project_name}} project.
|
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
|
For the full list of settings and their values, see
|
||||||
https://docs.djangoproject.com/en/dev/ref/settings/
|
https://docs.djangoproject.com/en/dev/ref/settings/
|
||||||
"""
|
"""
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
import environ
|
import environ
|
||||||
|
|
||||||
ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config/settings/base.py - 3 = {{ cookiecutter.project_slug }}/)
|
ROOT_DIR = environ.Path(__file__) - 3 # ({{ cookiecutter.project_slug }}/config/settings/base.py - 3 = {{ cookiecutter.project_slug }}/)
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
"""
|
||||||
Local settings
|
Local settings
|
||||||
|
|
||||||
|
@ -12,8 +11,6 @@ Local settings
|
||||||
- Add django-extensions as app
|
- Add django-extensions as app
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import socket
|
|
||||||
import os
|
|
||||||
from .base import * # noqa
|
from .base import * # noqa
|
||||||
|
|
||||||
# DEBUG
|
# DEBUG
|
||||||
|
@ -54,11 +51,15 @@ MIDDLEWARE += ['debug_toolbar.middleware.DebugToolbarMiddleware', ]
|
||||||
INSTALLED_APPS += ['debug_toolbar', ]
|
INSTALLED_APPS += ['debug_toolbar', ]
|
||||||
|
|
||||||
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
INTERNAL_IPS = ['127.0.0.1', '10.0.2.2', ]
|
||||||
|
{% if cookiecutter.use_docker == 'y' %}
|
||||||
|
{# [cookiecutter-django] This is a workaround to flake8 "imported but unused" errors #}
|
||||||
|
import socket
|
||||||
|
import os
|
||||||
# tricks to have debug toolbar when developing with docker
|
# tricks to have debug toolbar when developing with docker
|
||||||
if os.environ.get('USE_DOCKER') == 'yes':
|
if os.environ.get('USE_DOCKER') == 'yes':
|
||||||
ip = socket.gethostbyname(socket.gethostname())
|
ip = socket.gethostbyname(socket.gethostname())
|
||||||
INTERNAL_IPS += [ip[:-1] + '1']
|
INTERNAL_IPS += [ip[:-1] + '1']
|
||||||
|
{% endif %}
|
||||||
DEBUG_TOOLBAR_CONFIG = {
|
DEBUG_TOOLBAR_CONFIG = {
|
||||||
'DISABLE_PANELS': [
|
'DISABLE_PANELS': [
|
||||||
'debug_toolbar.panels.redirects.RedirectsPanel',
|
'debug_toolbar.panels.redirects.RedirectsPanel',
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
"""
|
"""
|
||||||
Production Configurations
|
Production Configurations
|
||||||
|
|
||||||
|
@ -12,10 +11,8 @@ Production Configurations
|
||||||
- Use opbeat for error reporting
|
- Use opbeat for error reporting
|
||||||
{% endif %}
|
{% endif %}
|
||||||
"""
|
"""
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
from boto.s3.connection import OrdinaryCallingFormat
|
from boto.s3.connection import OrdinaryCallingFormat
|
||||||
from django.utils import six
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
{% if cookiecutter.use_sentry_for_error_reporting == 'y' %}
|
||||||
import logging
|
import logging
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
@ -109,9 +106,9 @@ AWS_EXPIRY = 60 * 60 * 24 * 7
|
||||||
# TODO See: https://github.com/jschneier/django-storages/issues/47
|
# TODO See: https://github.com/jschneier/django-storages/issues/47
|
||||||
# Revert the following and use str after the above-mentioned bug is fixed in
|
# Revert the following and use str after the above-mentioned bug is fixed in
|
||||||
# either django-storage-redux or boto
|
# either django-storage-redux or boto
|
||||||
|
control = 'max-age=%d, s-maxage=%d, must-revalidate' % (AWS_EXPIRY, AWS_EXPIRY)
|
||||||
AWS_HEADERS = {
|
AWS_HEADERS = {
|
||||||
'Cache-Control': six.b('max-age=%d, s-maxage=%d, must-revalidate' % (
|
'Cache-Control': bytes(control, encoding='latin-1')
|
||||||
AWS_EXPIRY, AWS_EXPIRY))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
# URL that handles the media served from MEDIA_ROOT, used for managing
|
# URL that handles the media served from MEDIA_ROOT, used for managing
|
||||||
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
'''
|
'''
|
||||||
Test settings
|
Test settings
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from django.conf.urls import include, url
|
from django.conf.urls import include, url
|
||||||
from django.conf.urls.static import static
|
from django.conf.urls.static import static
|
||||||
|
@ -35,7 +32,6 @@ if settings.DEBUG:
|
||||||
]
|
]
|
||||||
if 'debug_toolbar' in settings.INSTALLED_APPS:
|
if 'debug_toolbar' in settings.INSTALLED_APPS:
|
||||||
import debug_toolbar
|
import debug_toolbar
|
||||||
|
urlpatterns = [
|
||||||
urlpatterns += [
|
|
||||||
url(r'^__debug__/', include(debug_toolbar.urls)),
|
url(r'^__debug__/', include(debug_toolbar.urls)),
|
||||||
]
|
] + urlpatterns
|
||||||
|
|
|
@ -13,14 +13,16 @@ middleware here, or combine a Django application with an application of another
|
||||||
framework.
|
framework.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
import os, sys
|
import os
|
||||||
|
import sys
|
||||||
|
|
||||||
|
from django.core.wsgi import get_wsgi_application
|
||||||
|
|
||||||
# This allows easy placement of apps within the interior
|
# This allows easy placement of apps within the interior
|
||||||
# {{ cookiecutter.project_slug }} directory.
|
# {{ cookiecutter.project_slug }} directory.
|
||||||
app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '')
|
app_path = os.path.dirname(os.path.abspath(__file__)).replace('/config', '')
|
||||||
sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}'))
|
sys.path.append(os.path.join(app_path, '{{ cookiecutter.project_slug }}'))
|
||||||
|
|
||||||
from django.core.wsgi import get_wsgi_application
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
{% if cookiecutter.use_sentry_for_error_reporting == 'y' -%}
|
||||||
if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production':
|
if os.environ.get('DJANGO_SETTINGS_MODULE') == 'config.settings.production':
|
||||||
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
|
from raven.contrib.django.raven_compat.middleware.wsgi import Sentry
|
||||||
|
|
|
@ -57,7 +57,7 @@ services:
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
redis:
|
redis:
|
||||||
image: redis:latest
|
image: redis:3.0
|
||||||
{% if cookiecutter.use_celery == 'y' %}
|
{% if cookiecutter.use_celery == 'y' %}
|
||||||
celeryworker:
|
celeryworker:
|
||||||
build:
|
build:
|
||||||
|
|
|
@ -1,5 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
#
|
|
||||||
# {{ cookiecutter.project_name }} documentation build configuration file, created by
|
# {{ cookiecutter.project_name }} documentation build configuration file, created by
|
||||||
# sphinx-quickstart.
|
# sphinx-quickstart.
|
||||||
#
|
#
|
||||||
|
@ -11,8 +9,6 @@
|
||||||
# All configuration values have a default; values that are commented out
|
# All configuration values have a default; values that are commented out
|
||||||
# serve to show the default.
|
# serve to show the default.
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,15 @@
|
||||||
{% if cookiecutter.use_python3 == 'y' -%}
|
|
||||||
# Wheel 0.25+ needed to install certain packages on CPython 3.5+
|
# Wheel 0.25+ needed to install certain packages on CPython 3.5+
|
||||||
# like Pillow and psycopg2
|
# like Pillow and psycopg2
|
||||||
# See http://bitly.com/wheel-building-fails-CPython-35
|
# See http://bitly.com/wheel-building-fails-CPython-35
|
||||||
# Verified bug on Python 3.5.1
|
# Verified bug on Python 3.5.1
|
||||||
wheel==0.29.0
|
wheel==0.29.0
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
# Bleeding edge Django
|
# Bleeding edge Django
|
||||||
django==1.10.7 # pyup: >=1.10,<1.11
|
django==1.10.7 # pyup: >=1.10,<1.11
|
||||||
|
|
||||||
# Configuration
|
# Configuration
|
||||||
django-environ==0.4.1
|
django-environ==0.4.3
|
||||||
{% if cookiecutter.use_whitenoise == 'y' -%}
|
{% if cookiecutter.use_whitenoise == 'y' -%}
|
||||||
whitenoise==3.3.0
|
whitenoise==3.3.0
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
@ -21,10 +20,10 @@ django-braces==1.11.0
|
||||||
django-crispy-forms==1.6.1
|
django-crispy-forms==1.6.1
|
||||||
|
|
||||||
# Models
|
# Models
|
||||||
django-model-utils==2.6.1
|
django-model-utils==3.0.0
|
||||||
|
|
||||||
# Images
|
# Images
|
||||||
Pillow==4.0.0
|
Pillow==4.1.0
|
||||||
|
|
||||||
# Password storage
|
# Password storage
|
||||||
argon2-cffi==16.3.0
|
argon2-cffi==16.3.0
|
||||||
|
|
|
@ -24,7 +24,7 @@ Collectfast==0.5.2
|
||||||
|
|
||||||
# Email backends for Mailgun, Postmark, SendGrid and more
|
# Email backends for Mailgun, Postmark, SendGrid and more
|
||||||
# -------------------------------------------------------
|
# -------------------------------------------------------
|
||||||
django-anymail==0.8
|
django-anymail==0.9
|
||||||
|
|
||||||
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
|
{% if cookiecutter.use_sentry_for_error_reporting == "y" -%}
|
||||||
# Raven is the Sentry client
|
# Raven is the Sentry client
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
{% if cookiecutter.use_python3 == 'y' -%}python-3.5.3{% else %}python-2.7.10{%- endif %}
|
python-3.5.3
|
||||||
|
|
|
@ -6,11 +6,7 @@ PROJECT_DIR="$(dirname "$WORK_DIR")"
|
||||||
pip --version >/dev/null 2>&1 || {
|
pip --version >/dev/null 2>&1 || {
|
||||||
echo >&2 -e "\npip is required but it's not installed."
|
echo >&2 -e "\npip is required but it's not installed."
|
||||||
echo >&2 -e "You can install it by running the following command:\n"
|
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"
|
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 "\n"
|
||||||
echo >&2 -e "\nFor more information, see pip documentation: https://pip.pypa.io/en/latest/"
|
echo >&2 -e "\nFor more information, see pip documentation: https://pip.pypa.io/en/latest/"
|
||||||
exit 1;
|
exit 1;
|
||||||
|
@ -19,11 +15,7 @@ pip --version >/dev/null 2>&1 || {
|
||||||
virtualenv --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 "\nvirtualenv is required but it's not installed."
|
||||||
echo >&2 -e "You can install it by running the following command:\n"
|
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"
|
echo >&2 "sudo -H pip3 install virtualenv"
|
||||||
{% else %}
|
|
||||||
echo >&2 "sudo -H pip2 install virtualenv"
|
|
||||||
{%- endif %}
|
|
||||||
echo >&2 -e "\n"
|
echo >&2 -e "\n"
|
||||||
echo >&2 -e "\nFor more information, see virtualenv documentation: https://virtualenv.pypa.io/en/latest/"
|
echo >&2 -e "\nFor more information, see virtualenv documentation: https://virtualenv.pypa.io/en/latest/"
|
||||||
exit 1;
|
exit 1;
|
||||||
|
@ -32,11 +24,7 @@ virtualenv --version >/dev/null 2>&1 || {
|
||||||
if [ -z "$VIRTUAL_ENV" ]; then
|
if [ -z "$VIRTUAL_ENV" ]; then
|
||||||
echo >&2 -e "\nYou need activate a virtualenv first"
|
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'
|
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\`"
|
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 -e "\nTo leave/disable the currently active virtualenv, run the following command:\n"
|
||||||
echo >&2 "deactivate"
|
echo >&2 "deactivate"
|
||||||
echo >&2 -e "\nTo activate the virtualenv again, run the following command:\n"
|
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
|
pip install -r $PROJECT_DIR/requirements.txt
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,7 @@
|
||||||
build-essential
|
build-essential
|
||||||
#required to translate
|
#required to translate
|
||||||
gettext
|
gettext
|
||||||
{% if cookiecutter.use_python3 == 'y' -%}
|
|
||||||
python3-dev
|
python3-dev
|
||||||
{% else %}
|
|
||||||
python-dev
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
##shared dependencies of:
|
##shared dependencies of:
|
||||||
##Pillow, pylibmc
|
##Pillow, pylibmc
|
||||||
|
|
|
@ -3,11 +3,7 @@
|
||||||
build-essential
|
build-essential
|
||||||
#required to translate
|
#required to translate
|
||||||
gettext
|
gettext
|
||||||
{% if cookiecutter.use_python3 == 'y' -%}
|
|
||||||
python3-dev
|
python3-dev
|
||||||
{% else %}
|
|
||||||
python-dev
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
##shared dependencies of:
|
##shared dependencies of:
|
||||||
##Pillow, pylibmc
|
##Pillow, pylibmc
|
||||||
|
@ -25,4 +21,3 @@ libwebp-dev
|
||||||
|
|
||||||
##django-extensions
|
##django-extensions
|
||||||
graphviz-dev
|
graphviz-dev
|
||||||
|
|
||||||
|
|
|
@ -3,11 +3,7 @@
|
||||||
build-essential
|
build-essential
|
||||||
#required to translate
|
#required to translate
|
||||||
gettext
|
gettext
|
||||||
{% if cookiecutter.use_python3 == 'y' -%}
|
|
||||||
python3-dev
|
python3-dev
|
||||||
{% else %}
|
|
||||||
python-dev
|
|
||||||
{%- endif %}
|
|
||||||
|
|
||||||
##shared dependencies of:
|
##shared dependencies of:
|
||||||
##Pillow, pylibmc
|
##Pillow, pylibmc
|
||||||
|
@ -25,4 +21,3 @@ libwebp-dev
|
||||||
|
|
||||||
##django-extensions
|
##django-extensions
|
||||||
graphviz-dev
|
graphviz-dev
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,2 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
__version__ = '{{ cookiecutter.version }}'
|
__version__ = '{{ cookiecutter.version }}'
|
||||||
__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')])
|
__version_info__ = tuple([int(num) if num.isdigit() else num for num in __version__.replace('-', '.', 1).split('.')])
|
||||||
|
|
|
@ -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
|
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
||||||
"""
|
"""
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
|
@ -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
|
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
||||||
"""
|
"""
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import django.contrib.sites.models
|
import django.contrib.sites.models
|
||||||
from django.contrib.sites.models import _simple_domain_name_validator
|
from django.contrib.sites.models import _simple_domain_name_validator
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals
|
|
||||||
|
|
||||||
import django.contrib.sites.models
|
import django.contrib.sites.models
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
||||||
|
|
|
@ -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
|
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.conf import settings
|
||||||
from django.db import migrations
|
from django.db import migrations
|
||||||
|
|
||||||
|
|
|
@ -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
|
http://cookiecutter-django.readthedocs.io/en/latest/faq.html#why-is-there-a-django-contrib-sites-directory-in-cookiecutter-django
|
||||||
"""
|
"""
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
{% if cookiecutter.use_celery == 'y' %}
|
{% if cookiecutter.use_celery == 'y' %}
|
||||||
from __future__ import absolute_import
|
|
||||||
import os
|
import os
|
||||||
from celery import Celery
|
from celery import Celery
|
||||||
from django.apps import apps, AppConfig
|
from django.apps import apps, AppConfig
|
||||||
|
|
|
@ -15,7 +15,7 @@
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
<!-- Latest compiled and minified Bootstrap 4 Alpha 4 CSS -->
|
<!-- Latest compiled and minified Bootstrap 4 Alpha 4 CSS -->
|
||||||
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/css/bootstrap.min.css" integrity="sha384-2hfp1SzUoho7/TsGGGDaFdsuuDL0LX2hnUp6VkX3CUQ2K4K+xjboZdsXyp4oUHZj" crossorigin="anonymous">
|
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
|
||||||
|
|
||||||
<!-- Your stuff: Third-party CSS libraries go here -->
|
<!-- Your stuff: Third-party CSS libraries go here -->
|
||||||
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %}
|
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress css %}{% endraw %}{% endif %}{% raw %}
|
||||||
|
@ -29,44 +29,43 @@
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<div class="m-b-1">
|
<div class="m-b-1">
|
||||||
<nav class="navbar navbar-dark navbar-static-top bg-inverse">
|
<nav class="navbar navbar-toggleable-md navbar-light bg-faded">
|
||||||
<div class="container">
|
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<a class="navbar-brand" href="/">{% endraw %}{{ cookiecutter.project_name }}{% raw %}</a>
|
<span class="navbar-toggler-icon"></span>
|
||||||
<button type="button" class="navbar-toggler hidden-sm-up pull-xs-right" data-toggle="collapse" data-target="#bs-navbar-collapse-1">
|
</button>
|
||||||
☰
|
<a class="navbar-brand" href="{% url 'home' %}">{% endraw %}{{ cookiecutter.project_name }}{% raw %}</a>
|
||||||
</button>
|
|
||||||
|
|
||||||
<!-- Collect the nav links, forms, and other content for toggling -->
|
<div class="collapse navbar-collapse" id="navbarSupportedContent">
|
||||||
<div class="collapse navbar-toggleable-xs" id="bs-navbar-collapse-1">
|
<ul class="navbar-nav mr-auto">
|
||||||
<ul class="nav navbar-nav">
|
<li class="nav-item active">
|
||||||
|
<a class="nav-link" href="{% url 'home' %}">Home <span class="sr-only">(current)</span></a>
|
||||||
|
</li>
|
||||||
|
<li class="nav-item">
|
||||||
|
<a class="nav-link" href="{% url 'about' %}">About</a>
|
||||||
|
</li>
|
||||||
|
{% if request.user.is_authenticated %}
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'home' %}">Home</a>
|
{# URL provided by django-allauth/account/urls.py #}
|
||||||
|
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
<a class="nav-link" href="{% url 'about' %}">About</a>
|
{# URL provided by django-allauth/account/urls.py #}
|
||||||
|
<a class="nav-link" href="{% url 'account_logout' %}">{% trans "Sign Out" %}</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
{% else %}
|
||||||
|
<li class="nav-item">
|
||||||
<ul class="nav navbar-nav pull-xs-right">
|
{# URL provided by django-allauth/account/urls.py #}
|
||||||
{% if request.user.is_authenticated %}
|
<a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a>
|
||||||
<li class="nav-item">
|
</li>
|
||||||
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a>
|
<li class="nav-item">
|
||||||
</li>
|
{# URL provided by django-allauth/account/urls.py #}
|
||||||
<li class="nav-item">
|
<a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% trans "Sign In" %}</a>
|
||||||
<a class="nav-link" href="{% url 'account_logout' %}">{% trans "Sign Out" %}</a>
|
</li>
|
||||||
</li>
|
{% endif %}
|
||||||
{% else %}
|
</ul>
|
||||||
<li class="nav-item">
|
|
||||||
<a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a>
|
|
||||||
</li>
|
|
||||||
<li class="nav-item">
|
|
||||||
<a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% trans "Sign In" %}</a>
|
|
||||||
</li>
|
|
||||||
{% endif %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="container">
|
<div class="container">
|
||||||
|
@ -90,9 +89,9 @@
|
||||||
<!-- Placed at the end of the document so the pages load faster -->
|
<!-- Placed at the end of the document so the pages load faster -->
|
||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
<!-- Required by Bootstrap v4 Alpha 4 -->
|
<!-- Required by Bootstrap v4 Alpha 4 -->
|
||||||
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js" integrity="sha384-3ceskX3iaEnIogmQchP8opvBy3Mi7Ce34nWjpBIwVTHfGYWQS9jwHDVRnpKKHJg7" crossorigin="anonymous"></script>
|
<script src="https://code.jquery.com/jquery-3.1.1.slim.min.js" integrity="sha384-A7FZj7v+d/sdmMqp/nOQwliLvUsJfDHW+k9Omg/a/EheAdgtzNs3hpfag6Ed950n" crossorigin="anonymous"></script>
|
||||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.3.7/js/tether.min.js" integrity="sha384-XTs3FgkjiBgo8qjEjBk0tGmf3wPrWtA6coPfQDfFEY8AnYJwjalXCiosYRBIBZX8" crossorigin="anonymous"></script>
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
|
||||||
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.4/js/bootstrap.min.js" integrity="sha384-VjEeINv9OSwtWFLAtmc4JCtEJXXBub00gtSnszmspDLCtC0I4z4nqz7rEFbIZLLU" crossorigin="anonymous"></script>
|
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<!-- Your stuff: Third-party javascript libraries go here -->
|
<!-- Your stuff: Third-party javascript libraries go here -->
|
||||||
|
|
||||||
|
|
|
@ -1 +0,0 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
|
@ -1,4 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from django.conf import settings
|
from django.conf import settings
|
||||||
from allauth.account.adapter import DefaultAccountAdapter
|
from allauth.account.adapter import DefaultAccountAdapter
|
||||||
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
|
from allauth.socialaccount.adapter import DefaultSocialAccountAdapter
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
from django import forms
|
from django import forms
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from django.contrib.auth.admin import UserAdmin as AuthUserAdmin
|
from django.contrib.auth.admin import UserAdmin as AuthUserAdmin
|
||||||
|
|
|
@ -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.models
|
||||||
import django.contrib.auth.validators
|
import django.contrib.auth.validators
|
||||||
from django.db import migrations, models
|
from django.db import migrations, models
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import unicode_literals, absolute_import
|
|
||||||
|
|
||||||
from django.contrib.auth.models import AbstractUser
|
from django.contrib.auth.models import AbstractUser
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.db import models
|
from django.db import models
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
from django.conf.urls import url
|
from django.conf.urls import url
|
||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
|
|
@ -1,6 +1,3 @@
|
||||||
# -*- coding: utf-8 -*-
|
|
||||||
from __future__ import absolute_import, unicode_literals
|
|
||||||
|
|
||||||
from django.core.urlresolvers import reverse
|
from django.core.urlresolvers import reverse
|
||||||
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
|
from django.views.generic import DetailView, ListView, RedirectView, UpdateView
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user