mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-07-10 16:12:29 +03:00
Merge branch 'master' into auto-generate-contributors
This commit is contained in:
commit
191cc719e8
36
.github/workflows/pre-commit-autoupdate.yml
vendored
Normal file
36
.github/workflows/pre-commit-autoupdate.yml
vendored
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
# Run pre-commit autoupdate every day at midnight
|
||||||
|
# and create a pull request if any changes
|
||||||
|
|
||||||
|
|
||||||
|
name: Pre-commit auto-update
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: "0 0 * * *"
|
||||||
|
workflow_dispatch: # to trigger manually
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
auto-update:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- uses: actions/setup-python@v2.1.1
|
||||||
|
with:
|
||||||
|
python-version: 3.8
|
||||||
|
|
||||||
|
- name: Install pre-commit
|
||||||
|
run: pip install pre-commit
|
||||||
|
|
||||||
|
- name: Run pre-commit autoupdate
|
||||||
|
working-directory: "{{cookiecutter.project_slug}}"
|
||||||
|
run: pre-commit autoupdate
|
||||||
|
|
||||||
|
- name: Create Pull Request
|
||||||
|
uses: peter-evans/create-pull-request@v2
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: update/pre-commit-autoupdate
|
||||||
|
title: Auto-update pre-commit hooks
|
||||||
|
commit-message: Auto-update pre-commit hooks
|
||||||
|
body: Update versions of tools in pre-commit configs to latest version
|
||||||
|
labels: update
|
|
@ -5,7 +5,7 @@ binaryornot==0.4.4
|
||||||
# Code quality
|
# Code quality
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
black==19.10b0
|
black==19.10b0
|
||||||
isort==4.3.21
|
isort==5.4.0
|
||||||
flake8==3.8.3
|
flake8==3.8.3
|
||||||
flake8-isort==4.0.0
|
flake8-isort==4.0.0
|
||||||
|
|
||||||
|
|
|
@ -4,7 +4,7 @@ fail_fast: true
|
||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: master
|
rev: v3.2.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: trailing-whitespace
|
- id: trailing-whitespace
|
||||||
- id: end-of-file-fixer
|
- id: end-of-file-fixer
|
||||||
|
@ -16,7 +16,7 @@ repos:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
- repo: https://github.com/timothycrosley/isort
|
- repo: https://github.com/timothycrosley/isort
|
||||||
rev: 4.3.21
|
rev: 5.3.2
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
|
|
|
@ -235,13 +235,12 @@ ANYMAIL = {}
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_ENABLED
|
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_ENABLED
|
||||||
COMPRESS_ENABLED = env.bool("COMPRESS_ENABLED", default=True)
|
COMPRESS_ENABLED = env.bool("COMPRESS_ENABLED", default=True)
|
||||||
|
{%- if cookiecutter.cloud_provider == 'None' %}
|
||||||
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
|
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
|
||||||
{%- if cookiecutter.cloud_provider == 'AWS' %}
|
|
||||||
COMPRESS_STORAGE = "storages.backends.s3boto3.S3Boto3Storage"
|
|
||||||
{%- elif cookiecutter.cloud_provider == 'GCP' %}
|
|
||||||
COMPRESS_STORAGE = "storages.backends.gcloud.GoogleCloudStorage"
|
|
||||||
{%- elif cookiecutter.cloud_provider == 'None' %}
|
|
||||||
COMPRESS_STORAGE = "compressor.storage.GzipCompressorFileStorage"
|
COMPRESS_STORAGE = "compressor.storage.GzipCompressorFileStorage"
|
||||||
|
{%- elif cookiecutter.cloud_provider in ('AWS', 'GCP') and cookiecutter.use_whitenoise == 'n' %}
|
||||||
|
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_STORAGE
|
||||||
|
COMPRESS_STORAGE = STATICFILES_STORAGE
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_URL
|
# https://django-compressor.readthedocs.io/en/latest/settings/#django.conf.settings.COMPRESS_URL
|
||||||
COMPRESS_URL = STATIC_URL{% if cookiecutter.use_whitenoise == 'y' or cookiecutter.cloud_provider == 'None' %} # noqa F405{% endif %}
|
COMPRESS_URL = STATIC_URL{% if cookiecutter.use_whitenoise == 'y' or cookiecutter.cloud_provider == 'None' %} # noqa F405{% endif %}
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
python-3.8.3
|
python-3.8.5
|
||||||
|
|
Loading…
Reference in New Issue
Block a user