mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-29 21:14:03 +03:00
Merge branch 'master' into django-multi
This commit is contained in:
commit
5a393f1d34
5
.github/contributors.json
vendored
5
.github/contributors.json
vendored
|
@ -1077,5 +1077,10 @@
|
||||||
"name": "lcd1232",
|
"name": "lcd1232",
|
||||||
"github_login": "lcd1232",
|
"github_login": "lcd1232",
|
||||||
"twitter_username": ""
|
"twitter_username": ""
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "Tames McTigue",
|
||||||
|
"github_login": "Tamerz",
|
||||||
|
"twitter_username": ""
|
||||||
}
|
}
|
||||||
]
|
]
|
2
.github/workflows/update-changelog.yml
vendored
2
.github/workflows/update-changelog.yml
vendored
|
@ -28,7 +28,7 @@ jobs:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4.9.0
|
uses: stefanzweifel/git-auto-commit-action@v4.9.2
|
||||||
with:
|
with:
|
||||||
commit_message: Update Changelog
|
commit_message: Update Changelog
|
||||||
file_pattern: CHANGELOG.md
|
file_pattern: CHANGELOG.md
|
||||||
|
|
2
.github/workflows/update-contributors.yml
vendored
2
.github/workflows/update-contributors.yml
vendored
|
@ -24,7 +24,7 @@ jobs:
|
||||||
run: python scripts/update_contributors.py
|
run: python scripts/update_contributors.py
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4.9.0
|
uses: stefanzweifel/git-auto-commit-action@v4.9.2
|
||||||
with:
|
with:
|
||||||
commit_message: Update Contributors
|
commit_message: Update Contributors
|
||||||
file_pattern: CONTRIBUTORS.md .github/contributors.json
|
file_pattern: CONTRIBUTORS.md .github/contributors.json
|
||||||
|
|
48
CHANGELOG.md
48
CHANGELOG.md
|
@ -3,6 +3,54 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
||||||
|
|
||||||
<!-- GENERATOR_PLACEHOLDER -->
|
<!-- GENERATOR_PLACEHOLDER -->
|
||||||
|
|
||||||
|
## [2021-03-26]
|
||||||
|
### Updated
|
||||||
|
- Update djangorestframework to 3.12.4 ([#3107](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3107))
|
||||||
|
|
||||||
|
## [2021-03-25]
|
||||||
|
### Updated
|
||||||
|
- Update djangorestframework to 3.12.3 ([#3105](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3105))
|
||||||
|
|
||||||
|
## [2021-03-22]
|
||||||
|
### Updated
|
||||||
|
- Update django-crispy-forms to 1.11.2 ([#3104](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3104))
|
||||||
|
- Update sphinx to 3.5.3 ([#3103](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3103))
|
||||||
|
- Update ipdb to 0.13.7 ([#3102](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3102))
|
||||||
|
- Update sphinx-autobuild to 2021.3.14 ([#3101](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3101))
|
||||||
|
- Update isort to 5.8.0 ([#3100](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3100))
|
||||||
|
- Update pre-commit to 2.11.1 ([#3089](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3089))
|
||||||
|
- Update flake8 to 3.9.0 ([#3096](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3096))
|
||||||
|
- Update pillow to 8.1.2 ([#3084](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3084))
|
||||||
|
- Auto-update pre-commit hooks ([#3095](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3095))
|
||||||
|
|
||||||
|
## [2021-03-05]
|
||||||
|
### Changed
|
||||||
|
- Updated test_urls.py and views.py to re-use User.get_absolute_url() ([#3070](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3070))
|
||||||
|
### Updated
|
||||||
|
- Bump stefanzweifel/git-auto-commit-action from v4.9.1 to v4.9.2 ([#3082](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3082))
|
||||||
|
|
||||||
|
## [2021-03-03]
|
||||||
|
### Updated
|
||||||
|
- Update tox to 3.23.0 ([#3079](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3079))
|
||||||
|
- Update ipdb to 0.13.5 ([#3078](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3078))
|
||||||
|
|
||||||
|
## [2021-03-02]
|
||||||
|
### Fixed
|
||||||
|
- Fixes for pytest job in Github CI workflow ([#3076](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3076))
|
||||||
|
### Updated
|
||||||
|
- Update pillow to 8.1.1 ([#3075](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3075))
|
||||||
|
- Update coverage to 5.5 ([#3074](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3074))
|
||||||
|
|
||||||
|
## [2021-02-24]
|
||||||
|
### Updated
|
||||||
|
- Bump stefanzweifel/git-auto-commit-action from v4.9.0 to v4.9.1 ([#3069](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3069))
|
||||||
|
|
||||||
|
## [2021-02-23]
|
||||||
|
### Changed
|
||||||
|
- Update to Django 3.1 ([#3043](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3043))
|
||||||
|
- Lint with pre-commit on CI with Github actions ([#3066](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3066))
|
||||||
|
- Use exception var in status code pages if available ([#2992](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/2992))
|
||||||
|
|
||||||
## [2021-02-22]
|
## [2021-02-22]
|
||||||
### Changed
|
### Changed
|
||||||
- refactor: remove default cache settings in test.py ([#3064](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3064))
|
- refactor: remove default cache settings in test.py ([#3064](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3064))
|
||||||
|
|
|
@ -1363,6 +1363,13 @@ Listed in alphabetical order.
|
||||||
</td>
|
</td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>Tames McTigue</td>
|
||||||
|
<td>
|
||||||
|
<a href="https://github.com/Tamerz">Tamerz</a>
|
||||||
|
</td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Tano Abeleyra</td>
|
<td>Tano Abeleyra</td>
|
||||||
<td>
|
<td>
|
||||||
|
|
|
@ -5,13 +5,14 @@ binaryornot==0.4.4
|
||||||
# Code quality
|
# Code quality
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
black==20.8b1
|
black==20.8b1
|
||||||
isort==5.7.0
|
isort==5.8.0
|
||||||
flake8==3.8.4
|
flake8==3.9.0
|
||||||
flake8-isort==4.0.0
|
flake8-isort==4.0.0
|
||||||
|
pre-commit==2.10.1
|
||||||
|
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
tox==3.22.0
|
tox==3.23.0
|
||||||
pytest==5.4.3 # pyup: <6 # https://github.com/hackebrot/pytest-cookies/issues/51
|
pytest==5.4.3 # pyup: <6 # https://github.com/hackebrot/pytest-cookies/issues/51
|
||||||
pytest-cookies==0.5.1
|
pytest-cookies==0.5.1
|
||||||
pytest-instafail==0.4.2
|
pytest-instafail==0.4.2
|
||||||
|
|
2
setup.py
2
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 = "3.1.7"
|
version = "3.1.8"
|
||||||
|
|
||||||
if sys.argv[-1] == "tag":
|
if sys.argv[-1] == "tag":
|
||||||
os.system(f'git tag -a {version} -m "version {version}"')
|
os.system(f'git tag -a {version} -m "version {version}"')
|
||||||
|
|
|
@ -27,5 +27,11 @@ sudo utility/install_os_dependencies.sh install
|
||||||
# Install Python deps
|
# Install Python deps
|
||||||
pip install -r requirements/local.txt
|
pip install -r requirements/local.txt
|
||||||
|
|
||||||
|
# Lint by running pre-commit on all files
|
||||||
|
# Needs a git repo to find the project root
|
||||||
|
git init
|
||||||
|
git add .
|
||||||
|
pre-commit run --show-diff-on-failure -a
|
||||||
|
|
||||||
# run the project's tests
|
# run the project's tests
|
||||||
pytest
|
pytest
|
||||||
|
|
|
@ -231,7 +231,7 @@ def test_gitlab_invokes_flake8_and_pytest(
|
||||||
["use_docker", "expected_test_script"],
|
["use_docker", "expected_test_script"],
|
||||||
[
|
[
|
||||||
("n", "pytest"),
|
("n", "pytest"),
|
||||||
("y", "docker-compose -f local.yml exec -T django pytest"),
|
("y", "docker-compose -f local.yml run django pytest"),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
def test_github_invokes_linter_and_pytest(
|
def test_github_invokes_linter_and_pytest(
|
||||||
|
|
|
@ -17,12 +17,16 @@ cd .cache/docker
|
||||||
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y $@
|
cookiecutter ../../ --no-input --overwrite-if-exists use_docker=y $@
|
||||||
cd my_awesome_project
|
cd my_awesome_project
|
||||||
|
|
||||||
|
# Lint by running pre-commit on all files
|
||||||
|
# Needs a git repo to find the project root
|
||||||
|
# We don't have git inside Docker, so run it outside
|
||||||
|
git init
|
||||||
|
git add .
|
||||||
|
pre-commit run --show-diff-on-failure -a
|
||||||
|
|
||||||
# run the project's type checks
|
# run the project's type checks
|
||||||
docker-compose -f local.yml run django mypy my_awesome_project
|
docker-compose -f local.yml run django mypy my_awesome_project
|
||||||
|
|
||||||
# Run black with --check option
|
|
||||||
docker-compose -f local.yml run django black --check --diff --exclude 'migrations' ./
|
|
||||||
|
|
||||||
# run the project's tests
|
# run the project's tests
|
||||||
docker-compose -f local.yml run django pytest
|
docker-compose -f local.yml run django pytest
|
||||||
|
|
||||||
|
|
|
@ -14,4 +14,4 @@ REDIS_URL=redis://redis:6379/0
|
||||||
# Flower
|
# Flower
|
||||||
CELERY_FLOWER_USER=!!!SET CELERY_FLOWER_USER!!!
|
CELERY_FLOWER_USER=!!!SET CELERY_FLOWER_USER!!!
|
||||||
CELERY_FLOWER_PASSWORD=!!!SET CELERY_FLOWER_PASSWORD!!!
|
CELERY_FLOWER_PASSWORD=!!!SET CELERY_FLOWER_PASSWORD!!!
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -7,11 +7,11 @@ env:
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ "master" ]
|
branches: [ "master", "main" ]
|
||||||
paths-ignore: [ "docs/**" ]
|
paths-ignore: [ "docs/**" ]
|
||||||
|
|
||||||
push:
|
push:
|
||||||
branches: [ "master" ]
|
branches: [ "master", "main" ]
|
||||||
paths-ignore: [ "docs/**" ]
|
paths-ignore: [ "docs/**" ]
|
||||||
|
|
||||||
|
|
||||||
|
@ -34,30 +34,50 @@ jobs:
|
||||||
- name: Install and Run Pre-commit
|
- name: Install and Run Pre-commit
|
||||||
uses: pre-commit/action@v2.0.0
|
uses: pre-commit/action@v2.0.0
|
||||||
|
|
||||||
# With no caching at all the entire ci process takes 4m 30s to complete!
|
# With no caching at all the entire ci process takes 4m 30s to complete!
|
||||||
pytest:
|
pytest:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
{%- if cookiecutter.use_docker == 'n' %}
|
||||||
|
|
||||||
|
services:
|
||||||
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
|
redis:
|
||||||
|
image: redis:5.0
|
||||||
|
ports:
|
||||||
|
- 6379:6379
|
||||||
|
{%- endif %}
|
||||||
|
postgres:
|
||||||
|
image: postgres:12
|
||||||
|
ports:
|
||||||
|
- 5432:5432
|
||||||
|
env:
|
||||||
|
POSTGRES_PASSWORD: postgres
|
||||||
|
|
||||||
|
env:
|
||||||
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
|
CELERY_BROKER_URL: "redis://localhost:6379/0"
|
||||||
|
{%- endif %}
|
||||||
|
# postgres://user:password@host:port/database
|
||||||
|
DATABASE_URL: "postgres://postgres:postgres@localhost:5432/postgres"
|
||||||
|
{%- endif %}
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
- name: Checkout Code Repository
|
- name: Checkout Code Repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
{% if cookiecutter.use_docker == 'y' -%}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
|
|
||||||
- name: Build the Stack
|
- name: Build the Stack
|
||||||
run: docker-compose -f local.yml build
|
run: docker-compose -f local.yml build
|
||||||
|
|
||||||
- name: Make DB Migrations
|
- name: Run DB Migrations
|
||||||
run: docker-compose -f local.yml run --rm django python manage.py migrate
|
run: docker-compose -f local.yml run --rm django python manage.py migrate
|
||||||
|
|
||||||
- name: Run the Stack
|
|
||||||
run: docker-compose -f local.yml up -d
|
|
||||||
|
|
||||||
- name: Run Django Tests
|
- name: Run Django Tests
|
||||||
run: docker-compose -f local.yml exec -T django pytest
|
run: docker-compose -f local.yml run django pytest
|
||||||
|
|
||||||
- name: Tear down the Stack
|
- name: Tear down the Stack
|
||||||
run: docker-compose -f local.yml down
|
run: docker-compose -f local.yml down
|
||||||
|
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
|
||||||
- name: Set up Python 3.8
|
- name: Set up Python 3.8
|
||||||
|
@ -69,8 +89,8 @@ jobs:
|
||||||
id: pip-cache-location
|
id: pip-cache-location
|
||||||
run: |
|
run: |
|
||||||
echo "::set-output name=dir::$(pip cache dir)"
|
echo "::set-output name=dir::$(pip cache dir)"
|
||||||
|
{%- raw %}
|
||||||
|
|
||||||
{% raw %}
|
|
||||||
- name: Cache pip Project Dependencies
|
- name: Cache pip Project Dependencies
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
|
@ -80,7 +100,7 @@ jobs:
|
||||||
key: ${{ runner.os }}-pip-${{ hashFiles('**/local.txt') }}
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/local.txt') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ runner.os }}-pip-
|
${{ runner.os }}-pip-
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: |
|
run: |
|
||||||
|
@ -89,5 +109,4 @@ jobs:
|
||||||
|
|
||||||
- name: Test with pytest
|
- name: Test with pytest
|
||||||
run: pytest
|
run: pytest
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -21,7 +21,6 @@ flake8:
|
||||||
|
|
||||||
pytest:
|
pytest:
|
||||||
stage: test
|
stage: test
|
||||||
image: python:3.8
|
|
||||||
{% if cookiecutter.use_docker == 'y' -%}
|
{% if cookiecutter.use_docker == 'y' -%}
|
||||||
image: docker/compose:latest
|
image: docker/compose:latest
|
||||||
tags:
|
tags:
|
||||||
|
@ -35,7 +34,8 @@ pytest:
|
||||||
- docker-compose -f local.yml up -d
|
- docker-compose -f local.yml up -d
|
||||||
script:
|
script:
|
||||||
- docker-compose -f local.yml run django pytest
|
- docker-compose -f local.yml run django pytest
|
||||||
{%- else %}
|
{%- else -%}
|
||||||
|
image: python:3.8
|
||||||
tags:
|
tags:
|
||||||
- python
|
- python
|
||||||
services:
|
services:
|
||||||
|
|
|
@ -16,14 +16,13 @@ repos:
|
||||||
- id: black
|
- id: black
|
||||||
|
|
||||||
- repo: https://github.com/timothycrosley/isort
|
- repo: https://github.com/timothycrosley/isort
|
||||||
rev: 5.7.0
|
rev: 5.8.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: isort
|
- id: isort
|
||||||
|
|
||||||
- repo: https://gitlab.com/pycqa/flake8
|
- repo: https://gitlab.com/pycqa/flake8
|
||||||
rev: 3.8.4
|
rev: 3.9.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: flake8
|
- id: flake8
|
||||||
args: ['--config=setup.cfg']
|
args: ['--config=setup.cfg']
|
||||||
additional_dependencies: [flake8-isort]
|
additional_dependencies: [flake8-isort]
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[MASTER]
|
[MASTER]
|
||||||
load-plugins=pylint_django{% if cookiecutter.use_celery == "y" %}, pylint_celery {% endif %}
|
load-plugins=pylint_django{% if cookiecutter.use_celery == "y" %}, pylint_celery{% endif %}
|
||||||
|
|
||||||
[FORMAT]
|
[FORMAT]
|
||||||
max-line-length=120
|
max-line-length=120
|
||||||
|
|
|
@ -7,7 +7,7 @@ Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||||
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||||
{% elif cookiecutter.open_source_license == 'BSD' %}
|
{%- elif cookiecutter.open_source_license == 'BSD' %}
|
||||||
Copyright (c) {% now 'utc', '%Y' %}, {{ cookiecutter.author_name }}
|
Copyright (c) {% now 'utc', '%Y' %}, {{ cookiecutter.author_name }}
|
||||||
All rights reserved.
|
All rights reserved.
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
|
||||||
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
|
||||||
OF THE POSSIBILITY OF SUCH DAMAGE.
|
OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
{% elif cookiecutter.open_source_license == 'GPLv3' %}
|
{%- elif cookiecutter.open_source_license == 'GPLv3' %}
|
||||||
Copyright (c) {% now 'utc', '%Y' %}, {{ cookiecutter.author_name }}
|
Copyright (c) {% now 'utc', '%Y' %}, {{ cookiecutter.author_name }}
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
|
@ -50,7 +50,7 @@ GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU General Public License
|
You should have received a copy of the GNU General Public License
|
||||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
{% elif cookiecutter.open_source_license == 'Apache Software License 2.0' %}
|
{%- elif cookiecutter.open_source_license == 'Apache Software License 2.0' %}
|
||||||
|
|
||||||
Apache License
|
Apache License
|
||||||
Version 2.0, January 2004
|
Version 2.0, January 2004
|
||||||
|
@ -242,4 +242,4 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
See the License for the specific language governing permissions and
|
See the License for the specific language governing permissions and
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
release: python manage.py migrate
|
release: python manage.py migrate
|
||||||
{% if cookiecutter.use_async == "y" -%}
|
{%- if cookiecutter.use_async == "y" -%}
|
||||||
web: gunicorn config.asgi:application -k uvicorn.workers.UvicornWorker
|
web: gunicorn config.asgi:application -k uvicorn.workers.UvicornWorker
|
||||||
{%- else %}
|
{%- else %}
|
||||||
web: gunicorn config.wsgi:application
|
web: gunicorn config.wsgi:application
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{% if cookiecutter.use_celery == "y" -%}
|
{%- if cookiecutter.use_celery == "y" -%}
|
||||||
worker: celery worker --app=config.celery_app --loglevel=info
|
worker: celery worker --app=config.celery_app --loglevel=info
|
||||||
beat: celery beat --app=config.celery_app --loglevel=info
|
beat: celery beat --app=config.celery_app --loglevel=info
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -9,10 +9,10 @@
|
||||||
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
|
||||||
:target: https://github.com/ambv/black
|
:target: https://github.com/ambv/black
|
||||||
:alt: Black code style
|
:alt: Black code style
|
||||||
{% if cookiecutter.open_source_license != "Not open source" %}
|
{%- if cookiecutter.open_source_license != "Not open source" %}
|
||||||
|
|
||||||
:License: {{cookiecutter.open_source_license}}
|
:License: {{cookiecutter.open_source_license}}
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
Settings
|
Settings
|
||||||
--------
|
--------
|
||||||
|
@ -67,7 +67,7 @@ Moved to `Live reloading and SASS compilation`_.
|
||||||
|
|
||||||
.. _`Live reloading and SASS compilation`: http://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html
|
.. _`Live reloading and SASS compilation`: http://cookiecutter-django.readthedocs.io/en/latest/live-reloading-and-sass-compilation.html
|
||||||
|
|
||||||
{% if cookiecutter.use_celery == "y" %}
|
{%- if cookiecutter.use_celery == "y" %}
|
||||||
|
|
||||||
Celery
|
Celery
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
@ -83,19 +83,21 @@ To run a celery worker:
|
||||||
|
|
||||||
Please note: For Celery's import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right.
|
Please note: For Celery's import magic to work, it is important *where* the celery commands are run. If you are in the same folder with *manage.py*, you should be right.
|
||||||
|
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
{% if cookiecutter.use_mailhog == "y" %}
|
{%- if cookiecutter.use_mailhog == "y" %}
|
||||||
|
|
||||||
Email Server
|
Email Server
|
||||||
^^^^^^^^^^^^
|
^^^^^^^^^^^^
|
||||||
{% if cookiecutter.use_docker == 'y' %}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
|
|
||||||
In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server `MailHog`_ with a web interface is available as docker container.
|
In development, it is often nice to be able to see emails that are being sent from your application. For that reason local SMTP server `MailHog`_ with a web interface is available as docker container.
|
||||||
|
|
||||||
Container mailhog will start automatically when you will run all docker containers.
|
Container mailhog will start automatically when you will run all docker containers.
|
||||||
Please check `cookiecutter-django Docker documentation`_ for more details how to start all containers.
|
Please check `cookiecutter-django Docker documentation`_ for more details how to start all containers.
|
||||||
|
|
||||||
With MailHog running, to view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025``
|
With MailHog running, to view messages that are sent by your application, open your browser and go to ``http://127.0.0.1:8025``
|
||||||
{% else %}
|
{%- else %}
|
||||||
|
|
||||||
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available.
|
In development, it is often nice to be able to see emails that are being sent from your application. If you choose to use `MailHog`_ when generating the project a local SMTP server with a web interface will be available.
|
||||||
|
|
||||||
#. `Download the latest MailHog release`_ for your OS.
|
#. `Download the latest MailHog release`_ for your OS.
|
||||||
|
@ -117,10 +119,10 @@ In development, it is often nice to be able to see emails that are being sent fr
|
||||||
Now you have your own mail server running locally, ready to receive whatever you send it.
|
Now you have your own mail server running locally, ready to receive whatever you send it.
|
||||||
|
|
||||||
.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog/releases
|
.. _`Download the latest MailHog release`: https://github.com/mailhog/MailHog/releases
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
.. _mailhog: https://github.com/mailhog/MailHog
|
.. _mailhog: https://github.com/mailhog/MailHog
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
{% if cookiecutter.use_sentry == "y" %}
|
{%- if cookiecutter.use_sentry == "y" %}
|
||||||
|
|
||||||
Sentry
|
Sentry
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
@ -129,13 +131,13 @@ Sentry is an error logging aggregator service. You can sign up for a free accoun
|
||||||
The system is setup with reasonable defaults, including 404 logging and integration with the WSGI application.
|
The system is setup with reasonable defaults, including 404 logging and integration with the WSGI application.
|
||||||
|
|
||||||
You must set the DSN url in production.
|
You must set the DSN url in production.
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
Deployment
|
Deployment
|
||||||
----------
|
----------
|
||||||
|
|
||||||
The following details how to deploy this application.
|
The following details how to deploy this application.
|
||||||
{% if cookiecutter.use_heroku.lower() == "y" %}
|
{%- if cookiecutter.use_heroku.lower() == "y" %}
|
||||||
|
|
||||||
Heroku
|
Heroku
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
@ -143,8 +145,8 @@ Heroku
|
||||||
See detailed `cookiecutter-django Heroku documentation`_.
|
See detailed `cookiecutter-django Heroku documentation`_.
|
||||||
|
|
||||||
.. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html
|
.. _`cookiecutter-django Heroku documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-on-heroku.html
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
{% if cookiecutter.use_docker.lower() == "y" %}
|
{%- if cookiecutter.use_docker.lower() == "y" %}
|
||||||
|
|
||||||
Docker
|
Docker
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
@ -152,9 +154,8 @@ Docker
|
||||||
See detailed `cookiecutter-django Docker documentation`_.
|
See detailed `cookiecutter-django Docker documentation`_.
|
||||||
|
|
||||||
.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html
|
.. _`cookiecutter-django Docker documentation`: http://cookiecutter-django.readthedocs.io/en/latest/deployment-with-docker.html
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
{%- if cookiecutter.custom_bootstrap_compilation == "y" %}
|
||||||
{% if cookiecutter.custom_bootstrap_compilation == "y" %}
|
|
||||||
Custom Bootstrap Compilation
|
Custom Bootstrap Compilation
|
||||||
^^^^^^
|
^^^^^^
|
||||||
|
|
||||||
|
@ -163,11 +164,11 @@ Bootstrap v4 is installed using npm and customised by tweaking your variables in
|
||||||
|
|
||||||
You can find a list of available variables `in the bootstrap source`_, or get explanations on them in the `Bootstrap docs`_.
|
You can find a list of available variables `in the bootstrap source`_, or get explanations on them in the `Bootstrap docs`_.
|
||||||
|
|
||||||
{% if cookiecutter.js_task_runner == 'Gulp' %}
|
{%- if cookiecutter.js_task_runner == 'Gulp' %}
|
||||||
Bootstrap's javascript as well as its dependencies is concatenated into a single file: ``static/js/vendors.js``.
|
Bootstrap's javascript as well as its dependencies is concatenated into a single file: ``static/js/vendors.js``.
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
.. _in the bootstrap source: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
|
.. _in the bootstrap source: https://github.com/twbs/bootstrap/blob/v4-dev/scss/_variables.scss
|
||||||
.. _Bootstrap docs: https://getbootstrap.com/docs/4.1/getting-started/theming/
|
.. _Bootstrap docs: https://getbootstrap.com/docs/4.1/getting-started/theming/
|
||||||
|
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -10,4 +10,4 @@ python manage.py migrate
|
||||||
uvicorn config.asgi:application --host 0.0.0.0 --reload
|
uvicorn config.asgi:application --host 0.0.0.0 --reload
|
||||||
{%- else %}
|
{%- else %}
|
||||||
python manage.py runserver_plus 0.0.0.0:8000
|
python manage.py runserver_plus 0.0.0.0:8000
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -21,4 +21,3 @@ export AWS_STORAGE_BUCKET_NAME="${DJANGO_AWS_STORAGE_BUCKET_NAME}"
|
||||||
aws s3 cp s3://${AWS_STORAGE_BUCKET_NAME}${BACKUP_DIR_PATH}/${1} ${BACKUP_DIR_PATH}/${1}
|
aws s3 cp s3://${AWS_STORAGE_BUCKET_NAME}${BACKUP_DIR_PATH}/${1} ${BACKUP_DIR_PATH}/${1}
|
||||||
|
|
||||||
message_success "Finished downloading ${1}."
|
message_success "Finished downloading ${1}."
|
||||||
|
|
||||||
|
|
|
@ -27,4 +27,3 @@ message_info "Cleaning the directory ${BACKUP_DIR_PATH}"
|
||||||
rm -rf ${BACKUP_DIR_PATH}/*
|
rm -rf ${BACKUP_DIR_PATH}/*
|
||||||
|
|
||||||
message_success "Finished uploading and cleaning."
|
message_success "Finished uploading and cleaning."
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,7 @@ http:
|
||||||
web-secure-router:
|
web-secure-router:
|
||||||
{%- if cookiecutter.domain_name.count('.') == 1 %}
|
{%- if cookiecutter.domain_name.count('.') == 1 %}
|
||||||
rule: "Host(`{{ cookiecutter.domain_name }}`) || Host(`www.{{ cookiecutter.domain_name }}`)"
|
rule: "Host(`{{ cookiecutter.domain_name }}`) || Host(`www.{{ cookiecutter.domain_name }}`)"
|
||||||
{% else %}
|
{%- else %}
|
||||||
rule: "Host(`{{ cookiecutter.domain_name }}`)"
|
rule: "Host(`{{ cookiecutter.domain_name }}`)"
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
entryPoints:
|
entryPoints:
|
||||||
|
|
|
@ -44,7 +44,7 @@ LOCALE_PATHS = [str(ROOT_DIR / "locale")]
|
||||||
DATABASES = {"default": env.db("DATABASE_URL")}
|
DATABASES = {"default": env.db("DATABASE_URL")}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
DATABASES = {
|
DATABASES = {
|
||||||
"default": env.db("DATABASE_URL", default="postgres://{% if cookiecutter.windows == 'y' %}localhost{% endif %}/{{cookiecutter.project_slug}}")
|
"default": env.db("DATABASE_URL", default="postgres://{% if cookiecutter.windows == 'y' %}localhost{% endif %}/{{cookiecutter.project_slug}}"),
|
||||||
}
|
}
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
DATABASES["default"]["ATOMIC_REQUESTS"] = True
|
DATABASES["default"]["ATOMIC_REQUESTS"] = True
|
||||||
|
@ -230,7 +230,8 @@ X_FRAME_OPTIONS = "DENY"
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
|
# https://docs.djangoproject.com/en/dev/ref/settings/#email-backend
|
||||||
EMAIL_BACKEND = env(
|
EMAIL_BACKEND = env(
|
||||||
"DJANGO_EMAIL_BACKEND", default="django.core.mail.backends.smtp.EmailBackend"
|
"DJANGO_EMAIL_BACKEND",
|
||||||
|
default="django.core.mail.backends.smtp.EmailBackend",
|
||||||
)
|
)
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#email-timeout
|
# https://docs.djangoproject.com/en/dev/ref/settings/#email-timeout
|
||||||
EMAIL_TIMEOUT = 5
|
EMAIL_TIMEOUT = 5
|
||||||
|
|
|
@ -146,7 +146,8 @@ DEFAULT_FROM_EMAIL = env(
|
||||||
SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL)
|
SERVER_EMAIL = env("DJANGO_SERVER_EMAIL", default=DEFAULT_FROM_EMAIL)
|
||||||
# https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix
|
# https://docs.djangoproject.com/en/dev/ref/settings/#email-subject-prefix
|
||||||
EMAIL_SUBJECT_PREFIX = env(
|
EMAIL_SUBJECT_PREFIX = env(
|
||||||
"DJANGO_EMAIL_SUBJECT_PREFIX", default="[{{cookiecutter.project_name}}]"
|
"DJANGO_EMAIL_SUBJECT_PREFIX",
|
||||||
|
default="[{{cookiecutter.project_name}}]",
|
||||||
)
|
)
|
||||||
|
|
||||||
# ADMIN
|
# ADMIN
|
||||||
|
|
|
@ -29,14 +29,14 @@ function pathsConfig(appName) {
|
||||||
const vendorsRoot = 'node_modules'
|
const vendorsRoot = 'node_modules'
|
||||||
|
|
||||||
return {
|
return {
|
||||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
{%- if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||||
bootstrapSass: `${vendorsRoot}/bootstrap/scss`,
|
bootstrapSass: `${vendorsRoot}/bootstrap/scss`,
|
||||||
vendorsJs: [
|
vendorsJs: [
|
||||||
`${vendorsRoot}/jquery/dist/jquery.slim.js`,
|
`${vendorsRoot}/jquery/dist/jquery.slim.js`,
|
||||||
`${vendorsRoot}/popper.js/dist/umd/popper.js`,
|
`${vendorsRoot}/popper.js/dist/umd/popper.js`,
|
||||||
`${vendorsRoot}/bootstrap/dist/js/bootstrap.js`,
|
`${vendorsRoot}/bootstrap/dist/js/bootstrap.js`,
|
||||||
],
|
],
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
app: this.app,
|
app: this.app,
|
||||||
templates: `${this.app}/templates`,
|
templates: `${this.app}/templates`,
|
||||||
css: `${this.app}/static/css`,
|
css: `${this.app}/static/css`,
|
||||||
|
@ -67,9 +67,9 @@ function styles() {
|
||||||
return src(`${paths.sass}/project.scss`)
|
return src(`${paths.sass}/project.scss`)
|
||||||
.pipe(sass({
|
.pipe(sass({
|
||||||
includePaths: [
|
includePaths: [
|
||||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
{%- if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||||
paths.bootstrapSass,
|
paths.bootstrapSass,
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
paths.sass
|
paths.sass
|
||||||
]
|
]
|
||||||
}).on('error', sass.logError))
|
}).on('error', sass.logError))
|
||||||
|
@ -90,7 +90,7 @@ function scripts() {
|
||||||
.pipe(dest(paths.js))
|
.pipe(dest(paths.js))
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
{%- if cookiecutter.custom_bootstrap_compilation == 'y' %}
|
||||||
// Vendor Javascript minification
|
// Vendor Javascript minification
|
||||||
function vendorScripts() {
|
function vendorScripts() {
|
||||||
return src(paths.vendorsJs)
|
return src(paths.vendorsJs)
|
||||||
|
@ -101,7 +101,7 @@ function vendorScripts() {
|
||||||
.pipe(rename({ suffix: '.min' }))
|
.pipe(rename({ suffix: '.min' }))
|
||||||
.pipe(dest(paths.js))
|
.pipe(dest(paths.js))
|
||||||
}
|
}
|
||||||
{% endif %}
|
{%- endif %}
|
||||||
|
|
||||||
// Image compression
|
// Image compression
|
||||||
function imgCompression() {
|
function imgCompression() {
|
||||||
|
@ -110,7 +110,7 @@ function imgCompression() {
|
||||||
.pipe(dest(paths.images))
|
.pipe(dest(paths.images))
|
||||||
}
|
}
|
||||||
|
|
||||||
{% if cookiecutter.use_async == 'y' -%}
|
{%- if cookiecutter.use_async == 'y' -%}
|
||||||
// Run django server
|
// Run django server
|
||||||
function asyncRunServer() {
|
function asyncRunServer() {
|
||||||
var cmd = spawn('gunicorn', [
|
var cmd = spawn('gunicorn', [
|
||||||
|
@ -143,7 +143,7 @@ function initBrowserSync() {
|
||||||
// https://www.browsersync.io/docs/options/#option-proxy
|
// https://www.browsersync.io/docs/options/#option-proxy
|
||||||
{%- if cookiecutter.use_docker == 'n' %}
|
{%- if cookiecutter.use_docker == 'n' %}
|
||||||
proxy: 'localhost:8000'
|
proxy: 'localhost:8000'
|
||||||
{% else %}
|
{%- else %}
|
||||||
proxy: {
|
proxy: {
|
||||||
target: 'django:8000',
|
target: 'django:8000',
|
||||||
proxyReq: [
|
proxyReq: [
|
||||||
|
@ -172,7 +172,7 @@ function watchPaths() {
|
||||||
const generateAssets = parallel(
|
const generateAssets = parallel(
|
||||||
styles,
|
styles,
|
||||||
scripts,
|
scripts,
|
||||||
{% if cookiecutter.custom_bootstrap_compilation == 'y' %}vendorScripts,{% endif %}
|
{%- if cookiecutter.custom_bootstrap_compilation == 'y' %}vendorScripts,{% endif %}
|
||||||
imgCompression
|
imgCompression
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -52,7 +52,6 @@ services:
|
||||||
ports:
|
ports:
|
||||||
- "7000:7000"
|
- "7000:7000"
|
||||||
command: /start-docs
|
command: /start-docs
|
||||||
|
|
||||||
{%- if cookiecutter.use_mailhog == 'y' %}
|
{%- if cookiecutter.use_mailhog == 'y' %}
|
||||||
|
|
||||||
mailhog:
|
mailhog:
|
||||||
|
@ -75,7 +74,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- postgres
|
- postgres
|
||||||
{% if cookiecutter.use_mailhog == 'y' -%}
|
{%- if cookiecutter.use_mailhog == 'y' %}
|
||||||
- mailhog
|
- mailhog
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
ports: []
|
ports: []
|
||||||
|
@ -88,7 +87,7 @@ services:
|
||||||
depends_on:
|
depends_on:
|
||||||
- redis
|
- redis
|
||||||
- postgres
|
- postgres
|
||||||
{% if cookiecutter.use_mailhog == 'y' -%}
|
{%- if cookiecutter.use_mailhog == 'y' %}
|
||||||
- mailhog
|
- mailhog
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
ports: []
|
ports: []
|
||||||
|
|
|
@ -64,10 +64,9 @@ services:
|
||||||
<<: *django
|
<<: *django
|
||||||
image: {{ cookiecutter.project_slug }}_production_flower
|
image: {{ cookiecutter.project_slug }}_production_flower
|
||||||
command: /start-flower
|
command: /start-flower
|
||||||
|
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
{%- if cookiecutter.cloud_provider == 'AWS' %}
|
||||||
|
|
||||||
{% if cookiecutter.cloud_provider == 'AWS' %}
|
|
||||||
awscli:
|
awscli:
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
pytz==2021.1 # https://github.com/stub42/pytz
|
pytz==2021.1 # https://github.com/stub42/pytz
|
||||||
python-slugify==4.0.1 # https://github.com/un33k/python-slugify
|
python-slugify==4.0.1 # https://github.com/un33k/python-slugify
|
||||||
Pillow==8.1.0 # https://github.com/python-pillow/Pillow
|
Pillow==8.2.0 # https://github.com/python-pillow/Pillow
|
||||||
{%- if cookiecutter.use_compressor == "y" %}
|
{%- if cookiecutter.use_compressor == "y" %}
|
||||||
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
|
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
|
||||||
rcssmin==1.0.6 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
rcssmin==1.0.6 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
||||||
|
@ -29,17 +29,17 @@ uvicorn[standard]==0.13.4 # https://github.com/encode/uvicorn
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
django==3.1.7 # pyup: < 3.2 # https://www.djangoproject.com/
|
django==3.1.8 # pyup: < 3.2 # https://www.djangoproject.com/
|
||||||
django-environ==0.4.5 # https://github.com/joke2k/django-environ
|
django-environ==0.4.5 # https://github.com/joke2k/django-environ
|
||||||
django-model-utils==4.1.1 # https://github.com/jazzband/django-model-utils
|
django-model-utils==4.1.1 # https://github.com/jazzband/django-model-utils
|
||||||
django-allauth==0.44.0 # https://github.com/pennersr/django-allauth
|
django-allauth==0.44.0 # https://github.com/pennersr/django-allauth
|
||||||
django-crispy-forms==1.11.1 # https://github.com/django-crispy-forms/django-crispy-forms
|
django-crispy-forms==1.11.2 # https://github.com/django-crispy-forms/django-crispy-forms
|
||||||
{%- if cookiecutter.use_compressor == "y" %}
|
{%- if cookiecutter.use_compressor == "y" %}
|
||||||
django-compressor==2.4 # https://github.com/django-compressor/django-compressor
|
django-compressor==2.4 # https://github.com/django-compressor/django-compressor
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
django-redis==4.12.1 # https://github.com/jazzband/django-redis
|
django-redis==4.12.1 # https://github.com/jazzband/django-redis
|
||||||
{%- if cookiecutter.use_drf == "y" %}
|
{%- if cookiecutter.use_drf == "y" %}
|
||||||
# Django REST Framework
|
# Django REST Framework
|
||||||
djangorestframework==3.12.2 # https://github.com/encode/django-rest-framework
|
djangorestframework==3.12.4 # https://github.com/encode/django-rest-framework
|
||||||
django-cors-headers==3.7.0 # https://github.com/adamchainz/django-cors-headers
|
django-cors-headers==3.7.0 # https://github.com/adamchainz/django-cors-headers
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
-r base.txt
|
-r base.txt
|
||||||
|
|
||||||
Werkzeug==1.0.1 # https://github.com/pallets/werkzeug
|
Werkzeug==1.0.1 # https://github.com/pallets/werkzeug
|
||||||
ipdb==0.13.4 # https://github.com/gotcha/ipdb
|
ipdb==0.13.7 # https://github.com/gotcha/ipdb
|
||||||
{%- if cookiecutter.use_docker == 'y' %}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
psycopg2==2.8.6 # https://github.com/psycopg/psycopg2
|
psycopg2==2.8.6 # https://github.com/psycopg/psycopg2
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
@ -15,31 +15,31 @@ watchgod==0.6 # https://github.com/samuelcolvin/watchgod
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
mypy==0.812 # https://github.com/python/mypy
|
mypy==0.812 # https://github.com/python/mypy
|
||||||
django-stubs==1.7.0 # https://github.com/typeddjango/django-stubs
|
django-stubs==1.7.0 # https://github.com/typeddjango/django-stubs
|
||||||
pytest==6.2.2 # https://github.com/pytest-dev/pytest
|
pytest==6.2.3 # https://github.com/pytest-dev/pytest
|
||||||
pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar
|
pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
sphinx==3.5.1 # https://github.com/sphinx-doc/sphinx
|
sphinx==3.5.3 # https://github.com/sphinx-doc/sphinx
|
||||||
sphinx-autobuild==2020.9.1 # https://github.com/GaretJax/sphinx-autobuild
|
sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
|
||||||
|
|
||||||
# Code quality
|
# Code quality
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
flake8==3.8.4 # https://github.com/PyCQA/flake8
|
flake8==3.9.0 # https://github.com/PyCQA/flake8
|
||||||
flake8-isort==4.0.0 # https://github.com/gforcada/flake8-isort
|
flake8-isort==4.0.0 # https://github.com/gforcada/flake8-isort
|
||||||
coverage==5.4 # https://github.com/nedbat/coveragepy
|
coverage==5.5 # https://github.com/nedbat/coveragepy
|
||||||
black==20.8b1 # https://github.com/ambv/black
|
black==20.8b1 # https://github.com/ambv/black
|
||||||
pylint-django==2.4.2 # https://github.com/PyCQA/pylint-django
|
pylint-django==2.4.2 # https://github.com/PyCQA/pylint-django
|
||||||
{%- if cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
pre-commit==2.10.1 # https://github.com/pre-commit/pre-commit
|
pre-commit==2.12.0 # https://github.com/pre-commit/pre-commit
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
factory-boy==3.2.0 # https://github.com/FactoryBoy/factory_boy
|
factory-boy==3.2.0 # https://github.com/FactoryBoy/factory_boy
|
||||||
|
|
||||||
django-debug-toolbar==3.2 # https://github.com/jazzband/django-debug-toolbar
|
django-debug-toolbar==3.2 # https://github.com/jazzband/django-debug-toolbar
|
||||||
django-extensions==3.1.1 # https://github.com/django-extensions/django-extensions
|
django-extensions==3.1.2 # https://github.com/django-extensions/django-extensions
|
||||||
django-coverage-plugin==1.8.0 # https://github.com/nedbat/django_coverage_plugin
|
django-coverage-plugin==1.8.0 # https://github.com/nedbat/django_coverage_plugin
|
||||||
pytest-django==4.1.0 # https://github.com/pytest-dev/pytest-django
|
pytest-django==4.1.0 # https://github.com/pytest-dev/pytest-django
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
|
|
||||||
-r base.txt
|
-r base.txt
|
||||||
|
|
||||||
gunicorn==20.0.4 # https://github.com/benoitc/gunicorn
|
gunicorn==20.1.0 # https://github.com/benoitc/gunicorn
|
||||||
psycopg2==2.8.6 # https://github.com/psycopg/psycopg2
|
psycopg2==2.8.6 # https://github.com/psycopg/psycopg2
|
||||||
{%- if cookiecutter.use_whitenoise == 'n' %}
|
{%- if cookiecutter.use_whitenoise == 'n' %}
|
||||||
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
|
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_sentry == "y" %}
|
{%- if cookiecutter.use_sentry == "y" %}
|
||||||
sentry-sdk==0.20.3 # https://github.com/getsentry/sentry-python
|
sentry-sdk==1.0.0 # https://github.com/getsentry/sentry-python
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
|
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
|
||||||
hiredis==1.1.0 # https://github.com/redis/hiredis-py
|
hiredis==1.1.0 # https://github.com/redis/hiredis-py
|
||||||
|
|
|
@ -33,9 +33,8 @@ if [ -z "$VIRTUAL_ENV" ]; then
|
||||||
echo >&2 -e "\n"
|
echo >&2 -e "\n"
|
||||||
exit 1;
|
exit 1;
|
||||||
else
|
else
|
||||||
|
|
||||||
pip install -r $PROJECT_DIR/requirements/local.txt
|
pip install -r $PROJECT_DIR/requirements/local.txt
|
||||||
{% if cookiecutter.use_heroku == "y" -%}
|
{%- if cookiecutter.use_heroku == "y" -%}
|
||||||
pip install -r $PROJECT_DIR/requirements.txt
|
pip install -r $PROJECT_DIR/requirements.txt
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
fi
|
fi
|
||||||
|
|
23
{{cookiecutter.project_slug}}/utility/requirements-focal.apt
Normal file
23
{{cookiecutter.project_slug}}/utility/requirements-focal.apt
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
##basic build dependencies of various Django apps for Ubuntu Focal 20.04
|
||||||
|
#build-essential metapackage install: make, gcc, g++,
|
||||||
|
build-essential
|
||||||
|
#required to translate
|
||||||
|
gettext
|
||||||
|
python3-dev
|
||||||
|
|
||||||
|
##shared dependencies of:
|
||||||
|
##Pillow, pylibmc
|
||||||
|
zlib1g-dev
|
||||||
|
|
||||||
|
##Postgresql and psycopg2 dependencies
|
||||||
|
libpq-dev
|
||||||
|
|
||||||
|
##Pillow dependencies
|
||||||
|
libtiff5-dev
|
||||||
|
libjpeg8-dev
|
||||||
|
libfreetype6-dev
|
||||||
|
liblcms2-dev
|
||||||
|
libwebp-dev
|
||||||
|
|
||||||
|
##django-extensions
|
||||||
|
graphviz-dev
|
|
@ -6,4 +6,5 @@
|
||||||
<h1>Forbidden (403)</h1>
|
<h1>Forbidden (403)</h1>
|
||||||
|
|
||||||
<p>{% if exception %}{{ exception }}{% else %}You're not allowed to access this page.{% endif %}</p>
|
<p>{% if exception %}{{ exception }}{% else %}You're not allowed to access this page.{% endif %}</p>
|
||||||
{% endblock content %}{% endraw %}
|
{% endblock content %}
|
||||||
|
{%- endraw %}
|
||||||
|
|
|
@ -6,4 +6,5 @@
|
||||||
<h1>Page not found</h1>
|
<h1>Page not found</h1>
|
||||||
|
|
||||||
<p>{% if exception %}{{ exception }}{% else %}This is not the page you were looking for.{% endif %}</p>
|
<p>{% if exception %}{{ exception }}{% else %}This is not the page you were looking for.{% endif %}</p>
|
||||||
{% endblock content %}{% endraw %}
|
{% endblock content %}
|
||||||
|
{%- endraw %}
|
||||||
|
|
|
@ -9,5 +9,4 @@
|
||||||
|
|
||||||
<p>We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.</p>
|
<p>We track these errors automatically, but if the problem persists feel free to contact us. In the meantime, try refreshing.</p>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
|
{%- endraw %}
|
||||||
{% endraw %}
|
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
<p>{% trans "This account is inactive." %}</p>
|
<p>{% trans "This account is inactive." %}</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -8,4 +8,4 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -77,4 +77,4 @@ window.addEventListener('DOMContentLoaded',function() {
|
||||||
$('.form-group').removeClass('row');
|
$('.form-group').removeClass('row');
|
||||||
</script>
|
</script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -29,4 +29,4 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -45,4 +45,4 @@ for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -16,7 +16,5 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<button class="btn btn-danger" type="submit">{% trans 'Sign Out' %}</button>
|
<button class="btn btn-danger" type="submit">{% trans 'Sign Out' %}</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -14,4 +14,4 @@
|
||||||
<button class="btn btn-primary" type="submit" name="action">{% trans "Change Password" %}</button>
|
<button class="btn btn-primary" type="submit" name="action">{% trans "Change Password" %}</button>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -23,4 +23,4 @@
|
||||||
|
|
||||||
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
|
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -14,4 +14,4 @@
|
||||||
|
|
||||||
<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
|
<p>{% blocktrans %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -22,4 +22,4 @@
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -7,4 +7,4 @@
|
||||||
<h1>{% trans "Change Password" %}</h1>
|
<h1>{% trans "Change Password" %}</h1>
|
||||||
<p>{% trans 'Your password is now changed.' %}</p>
|
<p>{% trans 'Your password is now changed.' %}</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -14,4 +14,4 @@
|
||||||
<input class="btn btn-primary" type="submit" name="action" value="{% trans 'Set Password' %}"/>
|
<input class="btn btn-primary" type="submit" name="action" value="{% trans 'Set Password' %}"/>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -20,4 +20,4 @@
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -9,4 +9,4 @@
|
||||||
|
|
||||||
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
|
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -10,4 +10,4 @@
|
||||||
<p>{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
|
<p>{% blocktrans %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -18,7 +18,5 @@ verification. Please click on the link inside this e-mail. Please
|
||||||
contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
|
contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
|
||||||
|
|
||||||
<p>{% blocktrans %}<strong>Note:</strong> you can still <a href="{{ email_url }}">change your e-mail address</a>.{% endblocktrans %}</p>
|
<p>{% blocktrans %}<strong>Note:</strong> you can still <a href="{{ email_url }}">change your e-mail address</a>.{% endblocktrans %}</p>
|
||||||
|
|
||||||
|
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -16,43 +16,43 @@
|
||||||
<link rel="icon" href="{% static 'images/favicons/favicon.ico' %}">
|
<link rel="icon" href="{% static 'images/favicons/favicon.ico' %}">
|
||||||
|
|
||||||
{% block css %}
|
{% block css %}
|
||||||
{% endraw %}{% if cookiecutter.custom_bootstrap_compilation == "n" %}{% raw %}
|
{%- endraw %}{% if cookiecutter.custom_bootstrap_compilation == "n" %}{% raw %}
|
||||||
<!-- Latest compiled and minified Bootstrap CSS -->
|
<!-- Latest compiled and minified Bootstrap CSS -->
|
||||||
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
<link href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
|
||||||
{% endraw %}{% endif %}{% raw %}
|
{%- endraw %}{% endif %}{% raw %}
|
||||||
|
|
||||||
<!-- 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 %}
|
||||||
<!-- This file stores project-specific CSS -->
|
<!-- This file stores project-specific CSS -->
|
||||||
{% endraw %}{% if cookiecutter.js_task_runner == "Gulp" and cookiecutter.use_compressor == "n" %}{% raw %}
|
{%- endraw %}{% if cookiecutter.js_task_runner == "Gulp" and cookiecutter.use_compressor == "n" %}{% raw %}
|
||||||
<link href="{% static 'css/project.min.css' %}" rel="stylesheet">
|
<link href="{% static 'css/project.min.css' %}" rel="stylesheet">
|
||||||
{% endraw %}{% else %}{% raw %}
|
{%- endraw %}{% else %}{% raw %}
|
||||||
<link href="{% static 'css/project.css' %}" rel="stylesheet">
|
<link href="{% static 'css/project.css' %}" rel="stylesheet">
|
||||||
{% endraw %}{% endif %}{% raw %}
|
{%- endraw %}{% endif %}{% raw %}
|
||||||
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %}
|
{%- endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %}
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
<!-- Le javascript
|
<!-- Le javascript
|
||||||
================================================== -->
|
================================================== -->
|
||||||
{# Placed at the top of the document so pages load faster with defer #}
|
{# Placed at the top of the document so pages load faster with defer #}
|
||||||
{% block javascript %}
|
{% block javascript %}
|
||||||
{% endraw %}{% if cookiecutter.custom_bootstrap_compilation == "y" and cookiecutter.js_task_runner == "Gulp" %}{% raw %}
|
{%- endraw %}{% if cookiecutter.custom_bootstrap_compilation == "y" and cookiecutter.js_task_runner == "Gulp" %}{% raw %}
|
||||||
<!-- Vendor dependencies bundled as one file-->
|
<!-- Vendor dependencies bundled as one file-->
|
||||||
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress js %}{% endraw %}{% endif %}{% raw %}
|
{%- endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress js %}{% endraw %}{% endif %}{% raw %}
|
||||||
<script defer src="{% static 'js/vendors.js' %}"></script>
|
<script defer src="{% static 'js/vendors.js' %}"></script>
|
||||||
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %}
|
{%- endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %}
|
||||||
{% endraw %}{% else %}{% raw %}
|
{%- endraw %}{% else %}{% raw %}
|
||||||
<!-- Bootstrap JS and its dependencies-->
|
<!-- Bootstrap JS and its dependencies-->
|
||||||
<script defer src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
<script defer src="https://code.jquery.com/jquery-3.3.1.slim.min.js" integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo" crossorigin="anonymous"></script>
|
||||||
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
<script defer src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.3/umd/popper.min.js" integrity="sha384-ZMP7rVo3mIykV+2+9J3UJ46jBk0WLaUAdn689aCwoqbBJiSnjAK/l8WvCWPIPm49" crossorigin="anonymous"></script>
|
||||||
<script defer src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
<script defer src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js" integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM" crossorigin="anonymous"></script>
|
||||||
|
|
||||||
<!-- Your stuff: Third-party javascript libraries go here -->
|
<!-- Your stuff: Third-party javascript libraries go here -->
|
||||||
{% endraw %}{% endif %}{% raw %}
|
{%- endraw %}{% endif %}{% raw %}
|
||||||
|
|
||||||
<!-- place project specific Javascript in this file -->
|
<!-- place project specific Javascript in this file -->
|
||||||
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress js %}{% endraw %}{% endif %}{% raw %}
|
{%- endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% compress js %}{% endraw %}{% endif %}{% raw %}
|
||||||
<script defer src="{% static 'js/project.js' %}"></script>
|
<script defer src="{% static 'js/project.js' %}"></script>
|
||||||
{% endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %}
|
{%- endraw %}{% if cookiecutter.use_compressor == "y" %}{% raw %}{% endcompress %}{% endraw %}{% endif %}{% raw %}
|
||||||
|
|
||||||
{% endblock javascript %}
|
{% endblock javascript %}
|
||||||
|
|
||||||
|
@ -121,4 +121,4 @@
|
||||||
{% endblock inline_javascript %}
|
{% endblock inline_javascript %}
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -30,7 +30,6 @@
|
||||||
<!-- End Action buttons -->
|
<!-- End Action buttons -->
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
{% endblock content %}
|
{% endblock content %}
|
||||||
{% endraw %}
|
{%- endraw %}
|
||||||
|
|
|
@ -14,4 +14,5 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
{% endblock %}{% endraw %}
|
{% endblock %}
|
||||||
|
{%- endraw %}
|
||||||
|
|
|
@ -25,7 +25,7 @@ class UserUpdateView(LoginRequiredMixin, SuccessMessageMixin, UpdateView):
|
||||||
success_message = _("Information successfully updated")
|
success_message = _("Information successfully updated")
|
||||||
|
|
||||||
def get_success_url(self):
|
def get_success_url(self):
|
||||||
return reverse("users:detail", kwargs={"username": self.request.user.username})
|
return self.request.user.get_absolute_url() # type: ignore [union-attr]
|
||||||
|
|
||||||
def get_object(self):
|
def get_object(self):
|
||||||
return self.request.user
|
return self.request.user
|
||||||
|
|
Loading…
Reference in New Issue
Block a user