mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 01:14:53 +03:00
Merge remote-tracking branch 'remotes/upstream/master' into sync_07_28
# Conflicts: # CONTRIBUTORS.rst # README.rst
This commit is contained in:
commit
1ade848610
|
@ -24,9 +24,9 @@ First things first.
|
|||
|
||||
$ source <virtual env path>/bin/activate
|
||||
|
||||
#. Install cookiecutter-django
|
||||
#. Install cookiecutter-django: ::
|
||||
|
||||
$ cookiecutter gh:pydanny/cookiecutter-django ::
|
||||
$ cookiecutter gh:pydanny/cookiecutter-django
|
||||
|
||||
#. Install development requirements: ::
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ Navigate to port 7000 on your host to see the documentation. This will be opened
|
|||
Generate API documentation
|
||||
----------------------------
|
||||
|
||||
Edit the docs/_source files and project application docstrings to create your documentation.
|
||||
Edit the ``docs/_source`` files and project application docstrings to create your documentation.
|
||||
|
||||
Sphinx can automatically include class and function signatures and docstrings in generated documentation.
|
||||
See the generated project documentation for more examples.
|
||||
|
|
|
@ -49,11 +49,11 @@ use_docker:
|
|||
postgresql_version:
|
||||
Select a PostgreSQL_ version to use. The choices are:
|
||||
|
||||
1. 11.3
|
||||
2. 10.8
|
||||
3. 9.6
|
||||
4. 9.5
|
||||
5. 9.4
|
||||
1. 12.3
|
||||
2. 11.8
|
||||
3. 10.8
|
||||
4. 9.6
|
||||
5. 9.5
|
||||
|
||||
js_task_runner:
|
||||
Select a JavaScript task runner. The choices are:
|
||||
|
|
|
@ -11,7 +11,7 @@ flake8-isort==3.0.1
|
|||
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
tox==3.17.1
|
||||
tox==3.18.0
|
||||
pytest==5.4.3
|
||||
pytest-cookies==0.5.1
|
||||
pytest-instafail==0.4.2
|
||||
|
|
|
@ -80,6 +80,7 @@ THIRD_PARTY_APPS = [
|
|||
{%- if cookiecutter.use_drf == "y" %}
|
||||
"rest_framework",
|
||||
"rest_framework.authtoken",
|
||||
"corsheaders",
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_vue == "y" %}
|
||||
"webpack_loader",
|
||||
|
@ -143,6 +144,9 @@ AUTH_PASSWORD_VALIDATORS = [
|
|||
# https://docs.djangoproject.com/en/dev/ref/settings/#middleware
|
||||
MIDDLEWARE = [
|
||||
"django.middleware.security.SecurityMiddleware",
|
||||
{%- if cookiecutter.use_drf == 'y' %}
|
||||
"corsheaders.middleware.CorsMiddleware",
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||
"whitenoise.middleware.WhiteNoiseMiddleware",
|
||||
{%- endif %}
|
||||
|
@ -330,6 +334,10 @@ REST_FRAMEWORK = {
|
|||
),
|
||||
"DEFAULT_PERMISSION_CLASSES": ("rest_framework.permissions.IsAuthenticated",),
|
||||
}
|
||||
|
||||
# django-cors-headers - https://github.com/adamchainz/django-cors-headers#setup
|
||||
CORS_URLS_REGEX = r"^/api/.*$"
|
||||
|
||||
{%- endif %}
|
||||
{% if cookiecutter.use_vue == "y" -%}
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ whitenoise==5.1.0 # https://github.com/evansd/whitenoise
|
|||
{%- endif %}
|
||||
redis==3.5.3 # https://github.com/andymccurdy/redis-py
|
||||
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
|
||||
hiredis==1.0.1 # https://github.com/redis/hiredis-py
|
||||
hiredis==1.1.0 # https://github.com/redis/hiredis-py
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_celery == "y" %}
|
||||
celery==4.4.6 # pyup: < 5.0 # https://github.com/celery/celery
|
||||
|
@ -24,7 +24,7 @@ flower==0.9.5 # https://github.com/mher/flower
|
|||
{%- endif %}
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_async == 'y' %}
|
||||
uvicorn==0.11.5 # https://github.com/encode/uvicorn
|
||||
uvicorn==0.11.6 # https://github.com/encode/uvicorn
|
||||
{%- endif %}
|
||||
|
||||
# Django
|
||||
|
@ -33,7 +33,7 @@ django==3.0.8 # pyup: < 3.1 # https://www.djangoproject.com/
|
|||
django-environ==0.4.5 # https://github.com/joke2k/django-environ
|
||||
django-model-utils==4.0.0 # https://github.com/jazzband/django-model-utils
|
||||
django-allauth==0.42.0 # https://github.com/pennersr/django-allauth
|
||||
django-crispy-forms==1.9.1 # https://github.com/django-crispy-forms/django-crispy-forms
|
||||
django-crispy-forms==1.9.2 # https://github.com/django-crispy-forms/django-crispy-forms
|
||||
{%- if cookiecutter.use_compressor == "y" %}
|
||||
django-compressor==2.4 # https://github.com/django-compressor/django-compressor
|
||||
{%- endif %}
|
||||
|
@ -41,6 +41,7 @@ django-redis==4.12.1 # https://github.com/jazzband/django-redis
|
|||
{%- if cookiecutter.use_drf == "y" %}
|
||||
# Django REST Framework
|
||||
djangorestframework==3.11.0 # https://github.com/encode/django-rest-framework
|
||||
django-cors-headers==3.4.0 # https://github.com/adamchainz/django-cors-headers
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_vue == "y" %}
|
||||
django-webpack-loader==0.6.0 # https://github.com/owais/django-webpack-loader
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
-r ./base.txt
|
||||
-r base.txt
|
||||
|
||||
Werkzeug==1.0.1 # https://github.com/pallets/werkzeug
|
||||
ipdb==0.13.3 # https://github.com/gotcha/ipdb
|
||||
|
@ -16,7 +16,7 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod
|
|||
mypy==0.782 # https://github.com/python/mypy
|
||||
django-stubs==1.5.0 # https://github.com/typeddjango/django-stubs
|
||||
pytest==5.4.3 # https://github.com/pytest-dev/pytest
|
||||
pytest-sugar==0.9.3 # https://github.com/Frozenball/pytest-sugar
|
||||
pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar
|
||||
|
||||
# Documentation
|
||||
# ------------------------------------------------------------------------------
|
||||
|
@ -27,9 +27,9 @@ sphinx-autobuild==0.7.1 # https://github.com/GaretJax/sphinx-autobuild
|
|||
# ------------------------------------------------------------------------------
|
||||
flake8==3.8.3 # https://github.com/PyCQA/flake8
|
||||
flake8-isort==3.0.1 # https://github.com/gforcada/flake8-isort
|
||||
coverage==5.2 # https://github.com/nedbat/coveragepy
|
||||
coverage==5.2.1 # https://github.com/nedbat/coveragepy
|
||||
black==19.10b0 # https://github.com/ambv/black
|
||||
pylint-django==2.1.0 # https://github.com/PyCQA/pylint-django
|
||||
pylint-django==2.2.0 # https://github.com/PyCQA/pylint-django
|
||||
{%- if cookiecutter.use_celery == 'y' %}
|
||||
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
||||
{%- endif %}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
# PRECAUTION: avoid production dependencies that aren't in development
|
||||
|
||||
-r ./base.txt
|
||||
-r base.txt
|
||||
|
||||
gunicorn==20.0.4 # https://github.com/benoitc/gunicorn
|
||||
psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
||||
|
@ -8,10 +8,10 @@ psycopg2==2.8.5 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
|||
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_sentry == "y" %}
|
||||
sentry-sdk==0.16.1 # https://github.com/getsentry/sentry-python
|
||||
sentry-sdk==0.16.2 # https://github.com/getsentry/sentry-python
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
|
||||
hiredis==1.0.1 # https://github.com/redis/hiredis-py
|
||||
hiredis==1.1.0 # https://github.com/redis/hiredis-py
|
||||
{%- endif %}
|
||||
|
||||
# Django
|
||||
|
@ -22,21 +22,21 @@ django-storages[boto3]==1.9.1 # https://github.com/jschneier/django-storages
|
|||
django-storages[google]==1.9.1 # https://github.com/jschneier/django-storages
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.mail_service == 'Mailgun' %}
|
||||
django-anymail[mailgun]==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail[mailgun]==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Amazon SES' %}
|
||||
django-anymail[amazon_ses]==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail[amazon_ses]==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Mailjet' %}
|
||||
django-anymail[mailjet]==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail[mailjet]==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Mandrill' %}
|
||||
django-anymail[mandrill]==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail[mandrill]==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Postmark' %}
|
||||
django-anymail[postmark]==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail[postmark]==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Sendgrid' %}
|
||||
django-anymail[sendgrid]==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail[sendgrid]==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'SendinBlue' %}
|
||||
django-anymail[sendinblue]==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail[sendinblue]==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'SparkPost' %}
|
||||
django-anymail[sparkpost]==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail[sparkpost]==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- elif cookiecutter.mail_service == 'Other SMTP' %}
|
||||
django-anymail==7.1.0 # https://github.com/anymail/django-anymail
|
||||
django-anymail==7.2 # https://github.com/anymail/django-anymail
|
||||
{%- endif %}
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||
<title>{% block title %}{% endraw %}{{ cookiecutter.project_name }}{% raw %}{% endblock title %}</title>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<meta name="description" content="">
|
||||
<meta name="author" content="">
|
||||
<meta name="description" content="{% endraw %}{{ cookiecutter.description }}{% raw %}">
|
||||
<meta name="author" content="{% endraw %}{{ cookiecutter.author_name }}{% raw %}">
|
||||
|
||||
<!-- HTML5 shim, for IE6-8 support of HTML5 elements -->
|
||||
<!--[if lt IE 9]>
|
||||
|
|
|
@ -2,4 +2,7 @@ from django.conf import settings
|
|||
|
||||
|
||||
def settings_context(_request):
|
||||
return {"settings": settings}
|
||||
"""Settings available by default to the templates context."""
|
||||
# Note: we intentionally do NOT expose the entire settings
|
||||
# to prevent accidental leaking of sensitive information
|
||||
return {"DEBUG": settings.DEBUG}
|
||||
|
|
Loading…
Reference in New Issue
Block a user