Merge branch 'master' into djangoissuer

This commit is contained in:
Bruno Alla 2021-11-08 22:49:57 +00:00
commit 5672b3f4c7
42 changed files with 323 additions and 145 deletions

View File

@ -1107,5 +1107,35 @@
"name": "Haseeb ur Rehman", "name": "Haseeb ur Rehman",
"github_login": "professorhaseeb", "github_login": "professorhaseeb",
"twitter_username": "professorhaseeb" "twitter_username": "professorhaseeb"
},
{
"name": "Abdul Qoyyuum",
"github_login": "Qoyyuum",
"twitter_username": "Qoyyuum"
},
{
"name": "mfosterw",
"github_login": "mfosterw",
"twitter_username": ""
},
{
"name": "Keith Callenberg",
"github_login": "keithcallenberg",
"twitter_username": ""
},
{
"name": "Mike97M",
"github_login": "Mike97M",
"twitter_username": ""
},
{
"name": "Charlie Macfarlane Brodie",
"github_login": "tannart",
"twitter_username": ""
},
{
"name": "Floyd Hightower",
"github_login": "fhightower",
"twitter_username": ""
} }
] ]

View File

@ -26,7 +26,7 @@ jobs:
run: pre-commit autoupdate run: pre-commit autoupdate
- name: Create Pull Request - name: Create Pull Request
uses: peter-evans/create-pull-request@v3.10.0 uses: peter-evans/create-pull-request@v3.10.1
with: with:
token: ${{ secrets.GITHUB_TOKEN }} token: ${{ secrets.GITHUB_TOKEN }}
branch: update/pre-commit-autoupdate branch: update/pre-commit-autoupdate

View File

@ -3,6 +3,80 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
<!-- GENERATOR_PLACEHOLDER --> <!-- GENERATOR_PLACEHOLDER -->
## [2021-09-06]
### Changed
- Update Celery to v5 ([#3280](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3280))
## [2021-09-05]
### Updated
- Update django-environ to 0.6.0 ([#3314](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3314))
## [2021-09-03]
### Changed
- Update available postgres versions ([#3297](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3297))
### Updated
- Update pre-commit to 2.15.0 ([#3313](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3313))
- Auto-update pre-commit hooks ([#3307](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3307))
- Update pillow to 8.3.2 ([#3312](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3312))
- Update django-environ to 0.5.0 ([#3311](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3311))
- Update pytest to 6.2.5 ([#3310](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3310))
- Update black to 21.8b0 ([#3308](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3308))
- Update argon2-cffi to 21.1.0 ([#3306](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3306))
- Bump peter-evans/create-pull-request from 3.10.0 to 3.10.1 ([#3303](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3303))
- Update django-debug-toolbar to 3.2.2 ([#3296](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3296))
- Update django-cors-headers to 3.8.0 ([#3295](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3295))
- Update uvicorn to 0.15.0 ([#3294](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3294))
## [2021-08-27]
### Updated
- Update tox to 3.24.3 ([#3302](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3302))
## [2021-08-20]
### Changed
- Fix Jinja2 break line control on Procfile ([#3300](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3300))
## [2021-08-19]
### Changed
- Fix several minor typos ([#3301](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3301))
## [2021-08-13]
### Changed
- Upgrade to Redis 6 ([#3255](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3255))
### Fixed
- Fix RTD build image to support Python 3.9 ([#3293](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3293))
## [2021-08-12]
### Changed
- Add documentation for automating backups ([#3268](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3268))
- Add missing step to getting started locally in docs ([#3291](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3291))
- Moved isort config from `.editorconfig` to `setup.cfg` ([#3290](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3290))
- How to pre-commit in Docker Development ([#3287](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3287))
### Updated
- Update sentry-sdk to 1.3.1 ([#3281](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3281))
- Update tox to 3.24.1 ([#3285](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3285))
- Update pre-commit to 2.14.0 ([#3289](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3289))
## [2021-07-30]
### Updated
- Auto-update pre-commit hooks ([#3283](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3283))
- Update isort to 5.9.3 ([#3282](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3282))
## [2021-07-27]
### Changed
- Convert trans to translate in templates ([#3277](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3277))
### Updated
- Update hiredis to 2.0.0 ([#3110](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3110))
- Update mypy to 0.910 ([#3237](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3237))
- Update whitenoise to 5.3.0 ([#3273](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3273))
- Update tox to 3.24.0 ([#3269](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3269))
- Update django-allauth to 0.45.0 ([#3267](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3267))
- Update sentry-sdk to 1.3.0 ([#3262](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3262))
- Update sphinx to 4.1.2 ([#3278](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3278))
- Auto-update pre-commit hooks ([#3264](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3264))
- Update isort to 5.9.2 ([#3279](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3279))
- Update pillow to 8.3.1 ([#3259](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3259))
- Update black to 21.7b0 ([#3272](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3272))
## [2021-07-12] ## [2021-07-12]
### Changed ### Changed
- Define REMAP_SIGTERM=SIGQUIT on Profile of Celery on Heroku ([#3263](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3263)) - Define REMAP_SIGTERM=SIGQUIT on Profile of Celery on Heroku ([#3263](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3263))

View File

@ -124,6 +124,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>Abdul Qoyyuum</td>
<td>
<a href="https://github.com/Qoyyuum">Qoyyuum</a>
</td>
<td>Qoyyuum</td>
</tr>
<tr> <tr>
<td>Adam Bogdał</td> <td>Adam Bogdał</td>
<td> <td>
@ -383,6 +390,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>Charlie Macfarlane Brodie</td>
<td>
<a href="https://github.com/tannart">tannart</a>
</td>
<td></td>
</tr>
<tr> <tr>
<td>Charlie Smith</td> <td>Charlie Smith</td>
<td> <td>
@ -677,6 +691,13 @@ Listed in alphabetical order.
</td> </td>
<td>windrush</td> <td>windrush</td>
</tr> </tr>
<tr>
<td>Floyd Hightower</td>
<td>
<a href="https://github.com/fhightower">fhightower</a>
</td>
<td></td>
</tr>
<tr> <tr>
<td>Gabriel Mejia</td> <td>Gabriel Mejia</td>
<td> <td>
@ -950,6 +971,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>Keith Callenberg</td>
<td>
<a href="https://github.com/keithcallenberg">keithcallenberg</a>
</td>
<td></td>
</tr>
<tr> <tr>
<td>Keith Webber</td> <td>Keith Webber</td>
<td> <td>
@ -1167,6 +1195,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>mfosterw</td>
<td>
<a href="https://github.com/mfosterw">mfosterw</a>
</td>
<td></td>
</tr>
<tr> <tr>
<td>Michael Gecht</td> <td>Michael Gecht</td>
<td> <td>
@ -1181,6 +1216,13 @@ Listed in alphabetical order.
</td> </td>
<td></td> <td></td>
</tr> </tr>
<tr>
<td>Mike97M</td>
<td>
<a href="https://github.com/Mike97M">Mike97M</a>
</td>
<td></td>
</tr>
<tr> <tr>
<td>Min ho Kim</td> <td>Min ho Kim</td>
<td> <td>

View File

@ -18,10 +18,11 @@ Prerequisites
* Docker; if you don't have it yet, follow the `installation instructions`_; * Docker; if you don't have it yet, follow the `installation instructions`_;
* Docker Compose; refer to the official documentation for the `installation guide`_. * Docker Compose; refer to the official documentation for the `installation guide`_.
* Pre-commit; refer to the official documentation for the `installation guide`_.
.. _`installation instructions`: https://docs.docker.com/install/#supported-platforms .. _`installation instructions`: https://docs.docker.com/install/#supported-platforms
.. _`installation guide`: https://docs.docker.com/compose/install/ .. _`installation guide`: https://docs.docker.com/compose/install/
.. _`pre-commit`: https://pre-commit.com/#install
Build the Stack Build the Stack
--------------- ---------------
@ -32,6 +33,13 @@ This can take a while, especially the first time you run this particular command
Generally, if you want to emulate production environment use ``production.yml`` instead. And this is true for any other actions you might need to perform: whenever a switch is required, just do it! Generally, if you want to emulate production environment use ``production.yml`` instead. And this is true for any other actions you might need to perform: whenever a switch is required, just do it!
Before doing any git commit, `pre-commit`_ should be installed globally on your local machine, and then::
$ git init
$ pre-commit install
Failing to do so will result with a bunch of CI and Linter errors that can be avoided with pre-commit.
Run the Stack Run the Stack
------------- -------------
@ -205,7 +213,7 @@ Developing locally with HTTPS
Increasingly it is becoming necessary to develop software in a secure environment in order that there are very few changes when deploying to production. Recently Facebook changed their policies for apps/sites that use Facebook login which requires the use of an HTTPS URL for the OAuth redirect URL. So if you want to use the ``users`` application with a OAuth provider such as Facebook, securing your communication to the local development environment will be necessary. Increasingly it is becoming necessary to develop software in a secure environment in order that there are very few changes when deploying to production. Recently Facebook changed their policies for apps/sites that use Facebook login which requires the use of an HTTPS URL for the OAuth redirect URL. So if you want to use the ``users`` application with a OAuth provider such as Facebook, securing your communication to the local development environment will be necessary.
On order to create a secure environment, we need to have a trusted SSL certficate installed in our Docker application. In order to create a secure environment, we need to have a trusted SSL certficate installed in our Docker application.
#. **Let's Encrypt** #. **Let's Encrypt**
@ -225,14 +233,14 @@ On order to create a secure environment, we need to have a trusted SSL certficat
.. _`mkcert`: https://github.com/FiloSottile/mkcert/blob/master/README.md#supported-root-stores .. _`mkcert`: https://github.com/FiloSottile/mkcert/blob/master/README.md#supported-root-stores
After installing a trusted TLS certificate, configure your docker installation. We are going to configure an ``nginx`` reverse-proxy server. This makes sure that it does not interfere with our ``traefik`` configuration that is reserved for production environements. After installing a trusted TLS certificate, configure your docker installation. We are going to configure an ``nginx`` reverse-proxy server. This makes sure that it does not interfere with our ``traefik`` configuration that is reserved for production environments.
These are the places that you should configure to secure your local environment. These are the places that you should configure to secure your local environment.
certs certs
~~~~~ ~~~~~
Take the certificates that you generated and place them in a folder called ``certs`` on the projects root folder. Assuming that you registered your local hostname as ``my-dev-env.local``, the certificates you will put in the folder should have the names ``my-dev-env.local.crt`` and ``my-dev-env.local.key``. Take the certificates that you generated and place them in a folder called ``certs`` in the project's root folder. Assuming that you registered your local hostname as ``my-dev-env.local``, the certificates you will put in the folder should have the names ``my-dev-env.local.crt`` and ``my-dev-env.local.key``.
local.yml local.yml
~~~~~~~~~ ~~~~~~~~~
@ -256,7 +264,7 @@ local.yml
... ...
#. Link the ``nginx-proxy`` to ``django`` through environmental variables. #. Link the ``nginx-proxy`` to ``django`` through environment variables.
``django`` already has an ``.env`` file connected to it. Add the following variables. You should do this especially if you are working with a team and you want to keep your local environment details to yourself. ``django`` already has an ``.env`` file connected to it. Add the following variables. You should do this especially if you are working with a team and you want to keep your local environment details to yourself.

View File

@ -30,6 +30,7 @@ First things first.
#. Install development requirements: :: #. Install development requirements: ::
$ cd <what you have entered as the project_slug at setup stage>
$ pip install -r requirements/local.txt $ pip install -r requirements/local.txt
$ git init # A git repo is required for pre-commit to install $ git init # A git repo is required for pre-commit to install
$ pre-commit install $ pre-commit install

View File

@ -55,8 +55,11 @@ With a single backup file copied to ``.`` that would be ::
$ docker cp 9c5c3f055843:/backups/backup_2018_03_13T09_05_07.sql.gz . $ docker cp 9c5c3f055843:/backups/backup_2018_03_13T09_05_07.sql.gz .
.. _`command`: https://docs.docker.com/engine/reference/commandline/cp/ You can also get the container ID using ``docker-compose -f local.yml ps -q postgres`` so if you want to automate your backups, you don't have to check the container ID manually every time. Here is the full command ::
$ docker cp $(docker-compose -f local.yml ps -q postgres):/backups ./backups
.. _`command`: https://docs.docker.com/engine/reference/commandline/cp/
Restoring from the Existing Backup Restoring from the Existing Backup
---------------------------------- ----------------------------------

View File

@ -49,11 +49,10 @@ use_docker:
postgresql_version: postgresql_version:
Select a PostgreSQL_ version to use. The choices are: Select a PostgreSQL_ version to use. The choices are:
1. 12.3 1. 13.2
2. 11.8 2. 12.6
3. 10.8 3. 11.11
4. 9.6 4. 10.16
5. 9.5
js_task_runner: js_task_runner:
Select a JavaScript task runner. The choices are: Select a JavaScript task runner. The choices are:

View File

@ -4,16 +4,16 @@ binaryornot==0.4.4
# Code quality # Code quality
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
black==21.6b0 black==21.8b0
isort==5.9.1 isort==5.9.3
flake8==3.9.2 flake8==3.9.2
flake8-isort==4.0.0 flake8-isort==4.0.0
pre-commit==2.13.0 pre-commit==2.15.0
# Testing # Testing
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
tox==3.23.1 tox==3.24.3
pytest==6.2.4 pytest==6.2.5
pytest-cookies==0.6.1 pytest-cookies==0.6.1
pytest-instafail==0.4.2 pytest-instafail==0.4.2
pyyaml==5.4.1 pyyaml==5.4.1

View File

@ -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.12" version = "3.1.13"
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}"')

View File

@ -281,3 +281,20 @@ def test_error_if_incompatible(cookies, context, invalid_context):
assert result.exit_code != 0 assert result.exit_code != 0
assert isinstance(result.exception, FailedHookException) assert isinstance(result.exception, FailedHookException)
@pytest.mark.parametrize(
["use_pycharm", "pycharm_docs_exist"],
[
("n", False),
("y", True),
],
)
def test_pycharm_docs_removed(cookies, context, use_pycharm, pycharm_docs_exist):
"""."""
context.update({"use_pycharm": use_pycharm})
result = cookies.bake(extra_context=context)
with open(f"{result.project}/docs/index.rst", "r") as f:
has_pycharm_docs = "pycharm/configuration" in f.read()
assert has_pycharm_docs is pycharm_docs_exist

View File

@ -12,18 +12,6 @@ trim_trailing_whitespace = true
indent_style = space indent_style = space
indent_size = 4 indent_size = 4
[*.py]
line_length = 88
known_first_party = {{cookiecutter.project_slug}},config
multi_line_output = 3
default_section = THIRDPARTY
recursive = true
skip = venv/
skip_glob = **/migrations/*.py
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
[*.{html,css,scss,json,yml}] [*.{html,css,scss,json,yml}]
indent_style = space indent_style = space
indent_size = 2 indent_size = 2

View File

@ -42,7 +42,7 @@ jobs:
services: services:
{%- if cookiecutter.use_celery == 'y' %} {%- if cookiecutter.use_celery == 'y' %}
redis: redis:
image: redis:5.0 image: redis:6
ports: ports:
- 6379:6379 - 6379:6379
{%- endif %} {%- endif %}

View File

@ -11,12 +11,12 @@ repos:
- id: check-yaml - id: check-yaml
- repo: https://github.com/psf/black - repo: https://github.com/psf/black
rev: 21.6b0 rev: 21.8b0
hooks: hooks:
- id: black - id: black
- repo: https://github.com/timothycrosley/isort - repo: https://github.com/timothycrosley/isort
rev: 5.9.1 rev: 5.9.3
hooks: hooks:
- id: isort - id: isort

View File

@ -3,6 +3,9 @@ version: 2
sphinx: sphinx:
configuration: docs/conf.py configuration: docs/conf.py
build:
image: testing
python: python:
version: 3.9 version: 3.9
install: install:

View File

@ -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: REMAP_SIGTERM=SIGQUIT celery worker --app=config.celery_app --loglevel=info worker: REMAP_SIGTERM=SIGQUIT celery -A config.celery_app worker --loglevel=info
beat: REMAP_SIGTERM=SIGQUIT celery beat --app=config.celery_app --loglevel=info beat: REMAP_SIGTERM=SIGQUIT celery -A config.celery_app beat --loglevel=info
{%- endif %} {%- endif %}

View File

@ -4,7 +4,8 @@ set -o errexit
set -o nounset set -o nounset
celery flower \ celery \
--app=config.celery_app \ -A config.celery_app \
--broker="${CELERY_BROKER_URL}" \ -b "${CELERY_BROKER_URL}" \
flower \
--basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}" --basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}"

View File

@ -4,7 +4,8 @@ set -o errexit
set -o nounset set -o nounset
celery flower \ celery \
--app=config.celery_app \ -A config.celery_app \
--broker="${CELERY_BROKER_URL}" \ -b "${CELERY_BROKER_URL}" \
flower \
--basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}" --basic_auth="${CELERY_FLOWER_USER}:${CELERY_FLOWER_PASSWORD}"

View File

@ -10,8 +10,8 @@ Welcome to {{ cookiecutter.project_name }}'s documentation!
:maxdepth: 2 :maxdepth: 2
:caption: Contents: :caption: Contents:
howto howto{% if cookiecutter.use_pycharm == 'y' %}
pycharm/configuration pycharm/configuration{% endif %}
users users

View File

@ -64,7 +64,7 @@ services:
{%- if cookiecutter.use_celery == 'y' %} {%- if cookiecutter.use_celery == 'y' %}
redis: redis:
image: redis:5.0 image: redis:6
container_name: redis container_name: redis
celeryworker: celeryworker:

View File

@ -47,7 +47,7 @@ services:
{%- endif %} {%- endif %}
redis: redis:
image: redis:5.0 image: redis:6
{%- if cookiecutter.use_celery == 'y' %} {%- if cookiecutter.use_celery == 'y' %}
celeryworker: celeryworker:

View File

@ -1,6 +1,6 @@
pytz==2021.1 # https://github.com/stub42/pytz pytz==2021.1 # https://github.com/stub42/pytz
python-slugify==5.0.2 # https://github.com/un33k/python-slugify python-slugify==5.0.2 # https://github.com/un33k/python-slugify
Pillow==8.2.0 # https://github.com/python-pillow/Pillow Pillow==8.3.2 # 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
@ -8,31 +8,31 @@ rcssmin==1.0.6 --install-option="--without-c-extensions" # https://github.com/n
rcssmin==1.0.6 # https://github.com/ndparker/rcssmin rcssmin==1.0.6 # https://github.com/ndparker/rcssmin
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
argon2-cffi==20.1.0 # https://github.com/hynek/argon2_cffi argon2-cffi==21.1.0 # https://github.com/hynek/argon2_cffi
{%- if cookiecutter.use_whitenoise == 'y' %} {%- if cookiecutter.use_whitenoise == 'y' %}
whitenoise==5.2.0 # https://github.com/evansd/whitenoise whitenoise==5.3.0 # https://github.com/evansd/whitenoise
{%- endif %} {%- endif %}
redis==3.5.3 # https://github.com/andymccurdy/redis-py redis==3.5.3 # https://github.com/andymccurdy/redis-py
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %} {%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
hiredis==1.1.0 # https://github.com/redis/hiredis-py hiredis==2.0.0 # https://github.com/redis/hiredis-py
{%- endif %} {%- endif %}
{%- if cookiecutter.use_celery == "y" %} {%- if cookiecutter.use_celery == "y" %}
celery==4.4.6 # pyup: < 5.0,!=4.4.7 # https://github.com/celery/celery celery==5.1.2 # pyup: < 6.0 # https://github.com/celery/celery
django-celery-beat==2.2.0 # https://github.com/celery/django-celery-beat django-celery-beat==2.2.1 # https://github.com/celery/django-celery-beat
{%- if cookiecutter.use_docker == 'y' %} {%- if cookiecutter.use_docker == 'y' %}
flower==0.9.7 # https://github.com/mher/flower flower==1.0.0 # https://github.com/mher/flower
{%- endif %} {%- endif %}
{%- endif %} {%- endif %}
{%- if cookiecutter.use_async == 'y' %} {%- if cookiecutter.use_async == 'y' %}
uvicorn[standard]==0.14.0 # https://github.com/encode/uvicorn uvicorn[standard]==0.15.0 # https://github.com/encode/uvicorn
{%- endif %} {%- endif %}
# Django # Django
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/ django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/
django-environ==0.4.5 # https://github.com/joke2k/django-environ django-environ==0.7.0 # 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.45.0 # https://github.com/pennersr/django-allauth
django-crispy-forms==1.12.0 # https://github.com/django-crispy-forms/django-crispy-forms django-crispy-forms==1.12.0 # https://github.com/django-crispy-forms/django-crispy-forms
{%- if cookiecutter.use_compressor == "y" %} {%- if cookiecutter.use_compressor == "y" %}
django-compressor==2.4.1 # https://github.com/django-compressor/django-compressor django-compressor==2.4.1 # https://github.com/django-compressor/django-compressor
@ -41,5 +41,5 @@ django-redis==5.0.0 # 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.4 # 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.8.0 # https://github.com/adamchainz/django-cors-headers
{%- endif %} {%- endif %}

View File

@ -13,14 +13,14 @@ watchgod==0.7 # https://github.com/samuelcolvin/watchgod
# Testing # Testing
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------
mypy==0.902 # https://github.com/python/mypy mypy==0.910 # https://github.com/python/mypy
django-stubs==1.8.0 # https://github.com/typeddjango/django-stubs django-stubs==1.8.0 # https://github.com/typeddjango/django-stubs
pytest==6.2.4 # https://github.com/pytest-dev/pytest pytest==6.2.5 # 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==4.0.2 # https://github.com/sphinx-doc/sphinx sphinx==4.1.2 # https://github.com/sphinx-doc/sphinx
sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
# Code quality # Code quality
@ -28,18 +28,18 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
flake8==3.9.2 # https://github.com/PyCQA/flake8 flake8==3.9.2 # 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.5 # https://github.com/nedbat/coveragepy coverage==5.5 # https://github.com/nedbat/coveragepy
black==21.6b0 # https://github.com/psf/black black==21.8b0 # https://github.com/psf/black
pylint-django==2.4.4 # https://github.com/PyCQA/pylint-django pylint-django==2.4.4 # 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.13.0 # https://github.com/pre-commit/pre-commit pre-commit==2.15.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.1 # https://github.com/jazzband/django-debug-toolbar django-debug-toolbar==3.2.2 # https://github.com/jazzband/django-debug-toolbar
django-extensions==3.1.3 # https://github.com/django-extensions/django-extensions django-extensions==3.1.3 # https://github.com/django-extensions/django-extensions
django-coverage-plugin==2.0.0 # https://github.com/nedbat/django_coverage_plugin django-coverage-plugin==2.0.0 # https://github.com/nedbat/django_coverage_plugin
pytest-django==4.4.0 # https://github.com/pytest-dev/pytest-django pytest-django==4.4.0 # https://github.com/pytest-dev/pytest-django

View File

@ -8,10 +8,10 @@ psycopg2==2.9.1 # https://github.com/psycopg/psycopg2
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==1.1.0 # https://github.com/getsentry/sentry-python sentry-sdk==1.3.1 # 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==2.0.0 # https://github.com/redis/hiredis-py
{%- endif %} {%- endif %}
# Django # Django

View File

@ -1 +1 @@
python-3.9.4 python-3.9.7

View File

@ -6,6 +6,17 @@ exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv
max-line-length = 120 max-line-length = 120
exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv
[isort]
line_length = 88
known_first_party = {{cookiecutter.project_slug}},config
multi_line_output = 3
default_section = THIRDPARTY
skip = venv/
skip_glob = **/migrations/*.py
include_trailing_comma = true
force_grid_wrap = 0
use_parentheses = true
[mypy] [mypy]
python_version = 3.9 python_version = 3.9
check_untyped_defs = True check_untyped_defs = True

View File

@ -2,11 +2,11 @@
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Account Inactive" %}{% endblock %} {% block head_title %}{% translate "Account Inactive" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Account Inactive" %}</h1> <h1>{% translate "Account Inactive" %}</h1>
<p>{% trans "This account is inactive." %}</p> <p>{% translate "This account is inactive." %}</p>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -4,13 +4,13 @@
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Account" %}{% endblock %} {% block head_title %}{% translate "Account" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "E-mail Addresses" %}</h1> <h1>{% translate "E-mail Addresses" %}</h1>
{% if user.emailaddress_set.all %} {% if user.emailaddress_set.all %}
<p>{% trans 'The following e-mail addresses are associated with your account:' %}</p> <p>{% translate 'The following e-mail addresses are associated with your account:' %}</p>
<form action="{% url 'account_email' %}" class="email_list" method="post"> <form action="{% url 'account_email' %}" class="email_list" method="post">
{% csrf_token %} {% csrf_token %}
@ -24,36 +24,36 @@
{{ emailaddress.email }} {{ emailaddress.email }}
{% if emailaddress.verified %} {% if emailaddress.verified %}
<span class="verified">{% trans "Verified" %}</span> <span class="verified">{% translate "Verified" %}</span>
{% else %} {% else %}
<span class="unverified">{% trans "Unverified" %}</span> <span class="unverified">{% translate "Unverified" %}</span>
{% endif %} {% endif %}
{% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %} {% if emailaddress.primary %}<span class="primary">{% translate "Primary" %}</span>{% endif %}
</label> </label>
</div> </div>
{% endfor %} {% endfor %}
<div class="form-group"> <div class="form-group">
<button class="secondaryAction btn btn-primary" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button> <button class="secondaryAction btn btn-primary" type="submit" name="action_primary" >{% translate 'Make Primary' %}</button>
<button class="secondaryAction btn btn-primary" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button> <button class="secondaryAction btn btn-primary" type="submit" name="action_send" >{% translate 'Re-send Verification' %}</button>
<button class="primaryAction btn btn-primary" type="submit" name="action_remove" >{% trans 'Remove' %}</button> <button class="primaryAction btn btn-primary" type="submit" name="action_remove" >{% translate 'Remove' %}</button>
</div> </div>
</fieldset> </fieldset>
</form> </form>
{% else %} {% else %}
<p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p> <p><strong>{% translate 'Warning:'%}</strong> {% translate "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
{% endif %} {% endif %}
<h2>{% trans "Add E-mail Address" %}</h2> <h2>{% translate "Add E-mail Address" %}</h2>
<form method="post" action="{% url 'account_email' %}" class="add_email"> <form method="post" action="{% url 'account_email' %}" class="add_email">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button class="btn btn-primary" name="action_add" type="submit">{% trans "Add E-mail" %}</button> <button class="btn btn-primary" name="action_add" type="submit">{% translate "Add E-mail" %}</button>
</form> </form>
{% endblock %} {% endblock %}
@ -63,7 +63,7 @@
{{ block.super }} {{ block.super }}
<script type="text/javascript"> <script type="text/javascript">
window.addEventListener('DOMContentLoaded',function() { window.addEventListener('DOMContentLoaded',function() {
const message = "{% trans 'Do you really want to remove the selected e-mail address?' %}"; const message = "{% translate 'Do you really want to remove the selected e-mail address?' %}";
const actions = document.getElementsByName('action_remove'); const actions = document.getElementsByName('action_remove');
if (actions.length) { if (actions.length) {
actions[0].addEventListener("click", function(e) { actions[0].addEventListener("click", function(e) {

View File

@ -3,28 +3,28 @@
{% load i18n %} {% load i18n %}
{% load account %} {% load account %}
{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %} {% block head_title %}{% translate "Confirm E-mail Address" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Confirm E-mail Address" %}</h1> <h1>{% translate "Confirm E-mail Address" %}</h1>
{% if confirmation %} {% if confirmation %}
{% user_display confirmation.email_address.user as user_display %} {% user_display confirmation.email_address.user as user_display %}
<p>{% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p> <p>{% blocktranslate with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktranslate %}</p>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}"> <form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %} {% csrf_token %}
<button class="btn btn-primary" type="submit">{% trans 'Confirm' %}</button> <button class="btn btn-primary" type="submit">{% translate 'Confirm' %}</button>
</form> </form>
{% else %} {% else %}
{% url 'account_email' as email_url %} {% url 'account_email' as email_url %}
<p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p> <p>{% blocktranslate %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktranslate %}</p>
{% endif %} {% endif %}

View File

@ -4,18 +4,18 @@
{% load account socialaccount %} {% load account socialaccount %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Sign In" %}{% endblock %} {% block head_title %}{% translate "Sign In" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Sign In" %}</h1> <h1>{% translate "Sign In" %}</h1>
{% get_providers as socialaccount_providers %} {% get_providers as socialaccount_providers %}
{% if socialaccount_providers %} {% if socialaccount_providers %}
<p>{% blocktrans with site.name as site_name %}Please sign in with one <p>{% blocktranslate with site.name as site_name %}Please sign in with one
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a> of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
for a {{ site_name }} account and sign in below:{% endblocktrans %}</p> for a {{ site_name }} account and sign in below:{% endblocktranslate %}</p>
<div class="socialaccount_ballot"> <div class="socialaccount_ballot">
@ -23,15 +23,15 @@ for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
{% include "socialaccount/snippets/provider_list.html" with process="login" %} {% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul> </ul>
<div class="login-or">{% trans 'or' %}</div> <div class="login-or">{% translate 'or' %}</div>
</div> </div>
{% include "socialaccount/snippets/login_extra.html" %} {% include "socialaccount/snippets/login_extra.html" %}
{% else %} {% else %}
<p>{% blocktrans %}If you have not created an account yet, then please <p>{% blocktranslate %}If you have not created an account yet, then please
<a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p> <a href="{{ signup_url }}">sign up</a> first.{% endblocktranslate %}</p>
{% endif %} {% endif %}
<form class="login" method="POST" action="{% url 'account_login' %}"> <form class="login" method="POST" action="{% url 'account_login' %}">
@ -40,8 +40,8 @@ for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
{% if redirect_field_value %} {% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" /> <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %} {% endif %}
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a> <a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% translate "Forgot Password?" %}</a>
<button class="primaryAction btn btn-primary" type="submit">{% trans "Sign In" %}</button> <button class="primaryAction btn btn-primary" type="submit">{% translate "Sign In" %}</button>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -2,19 +2,19 @@
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Sign Out" %}{% endblock %} {% block head_title %}{% translate "Sign Out" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Sign Out" %}</h1> <h1>{% translate "Sign Out" %}</h1>
<p>{% trans 'Are you sure you want to sign out?' %}</p> <p>{% translate 'Are you sure you want to sign out?' %}</p>
<form method="post" action="{% url 'account_logout' %}"> <form method="post" action="{% url 'account_logout' %}">
{% csrf_token %} {% csrf_token %}
{% if redirect_field_value %} {% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/> <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
{% endif %} {% endif %}
<button class="btn btn-danger" type="submit">{% trans 'Sign Out' %}</button> <button class="btn btn-danger" type="submit">{% translate 'Sign Out' %}</button>
</form> </form>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -3,15 +3,15 @@
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %} {% block head_title %}{% translate "Change Password" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Change Password" %}</h1> <h1>{% translate "Change Password" %}</h1>
<form method="POST" action="{% url 'account_change_password' %}" class="password_change"> <form method="POST" action="{% url 'account_change_password' %}" class="password_change">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<button class="btn btn-primary" type="submit" name="action">{% trans "Change Password" %}</button> <button class="btn btn-primary" type="submit" name="action">{% translate "Change Password" %}</button>
</form> </form>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -4,23 +4,23 @@
{% load account %} {% load account %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Password Reset" %}{% endblock %} {% block head_title %}{% translate "Password Reset" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Password Reset" %}</h1> <h1>{% translate "Password Reset" %}</h1>
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %} {% include "account/snippets/already_logged_in.html" %}
{% endif %} {% endif %}
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p> <p>{% translate "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
<form method="POST" action="{% url 'account_reset_password' %}" class="password_reset"> <form method="POST" action="{% url 'account_reset_password' %}" class="password_reset">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<input class="btn btn-primary" type="submit" value="{% trans 'Reset My Password' %}" /> <input class="btn btn-primary" type="submit" value="{% translate 'Reset My Password' %}" />
</form> </form>
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p> <p>{% blocktranslate %}Please contact us if you have any trouble resetting your password.{% endblocktranslate %}</p>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -3,15 +3,15 @@
{% load i18n %} {% load i18n %}
{% load account %} {% load account %}
{% block head_title %}{% trans "Password Reset" %}{% endblock %} {% block head_title %}{% translate "Password Reset" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Password Reset" %}</h1> <h1>{% translate "Password Reset" %}</h1>
{% if user.is_authenticated %} {% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %} {% include "account/snippets/already_logged_in.html" %}
{% endif %} {% endif %}
<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>{% blocktranslate %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %}</p>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -2,23 +2,23 @@
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Change Password" %}{% endblock %} {% block head_title %}{% translate "Change Password" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1> <h1>{% if token_fail %}{% translate "Bad Token" %}{% else %}{% translate "Change Password" %}{% endif %}</h1>
{% if token_fail %} {% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %} {% url 'account_reset_password' as passwd_reset_url %}
<p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p> <p>{% blocktranslate %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktranslate %}</p>
{% else %} {% else %}
{% if form %} {% if form %}
<form method="POST" action="."> <form method="POST" action=".">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<input class="btn btn-primary" type="submit" name="action" value="{% trans 'change password' %}"/> <input class="btn btn-primary" type="submit" name="action" value="{% translate 'change password' %}"/>
</form> </form>
{% else %} {% else %}
<p>{% trans 'Your password is now changed.' %}</p> <p>{% translate 'Your password is now changed.' %}</p>
{% endif %} {% endif %}
{% endif %} {% endif %}
{% endblock %} {% endblock %}

View File

@ -1,10 +1,10 @@
{% raw %}{% extends "account/base.html" %} {% raw %}{% extends "account/base.html" %}
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Change Password" %}{% endblock %} {% block head_title %}{% translate "Change Password" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Change Password" %}</h1> <h1>{% translate "Change Password" %}</h1>
<p>{% trans 'Your password is now changed.' %}</p> <p>{% translate 'Your password is now changed.' %}</p>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -3,15 +3,15 @@
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Set Password" %}{% endblock %} {% block head_title %}{% translate "Set Password" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Set Password" %}</h1> <h1>{% translate "Set Password" %}</h1>
<form method="POST" action="{% url 'account_set_password' %}" class="password_set"> <form method="POST" action="{% url 'account_set_password' %}" class="password_set">
{% csrf_token %} {% csrf_token %}
{{ form|crispy }} {{ form|crispy }}
<input class="btn btn-primary" type="submit" name="action" value="{% trans 'Set Password' %}"/> <input class="btn btn-primary" type="submit" name="action" value="{% translate 'Set Password' %}"/>
</form> </form>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -3,12 +3,12 @@
{% load i18n %} {% load i18n %}
{% load crispy_forms_tags %} {% load crispy_forms_tags %}
{% block head_title %}{% trans "Signup" %}{% endblock %} {% block head_title %}{% translate "Signup" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Sign Up" %}</h1> <h1>{% translate "Sign Up" %}</h1>
<p>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p> <p>{% blocktranslate %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktranslate %}</p>
<form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}"> <form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">
{% csrf_token %} {% csrf_token %}
@ -16,7 +16,7 @@
{% if redirect_field_value %} {% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" /> <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %} {% endif %}
<button class="btn btn-primary" type="submit">{% trans "Sign Up" %} &raquo;</button> <button class="btn btn-primary" type="submit">{% translate "Sign Up" %} &raquo;</button>
</form> </form>
{% endblock %} {% endblock %}

View File

@ -2,11 +2,11 @@
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Sign Up Closed" %}{% endblock %} {% block head_title %}{% translate "Sign Up Closed" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Sign Up Closed" %}</h1> <h1>{% translate "Sign Up Closed" %}</h1>
<p>{% trans "We are sorry, but the sign up is currently closed." %}</p> <p>{% translate "We are sorry, but the sign up is currently closed." %}</p>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -2,12 +2,12 @@
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} {% block head_title %}{% translate "Verify Your E-mail Address" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Verify Your E-mail Address" %}</h1> <h1>{% translate "Verify Your E-mail Address" %}</h1>
<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>{% blocktranslate %}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.{% endblocktranslate %}</p>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -2,21 +2,21 @@
{% load i18n %} {% load i18n %}
{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %} {% block head_title %}{% translate "Verify Your E-mail Address" %}{% endblock %}
{% block inner %} {% block inner %}
<h1>{% trans "Verify Your E-mail Address" %}</h1> <h1>{% translate "Verify Your E-mail Address" %}</h1>
{% url 'account_email' as email_url %} {% url 'account_email' as email_url %}
<p>{% blocktrans %}This part of the site requires us to verify that <p>{% blocktranslate %}This part of the site requires us to verify that
you are who you claim to be. For this purpose, we require that you you are who you claim to be. For this purpose, we require that you
verify ownership of your e-mail address. {% endblocktrans %}</p> verify ownership of your e-mail address. {% endblocktranslate %}</p>
<p>{% blocktrans %}We have sent an e-mail to you for <p>{% blocktranslate %}We have sent an e-mail to you for
verification. Please click on the link inside this e-mail. Please 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.{% endblocktranslate %}</p>
<p>{% blocktrans %}<strong>Note:</strong> you can still <a href="{{ email_url }}">change your e-mail address</a>.{% endblocktrans %}</p> <p>{% blocktranslate %}<strong>Note:</strong> you can still <a href="{{ email_url }}">change your e-mail address</a>.{% endblocktranslate %}</p>
{% endblock %} {% endblock %}
{%- endraw %} {%- endraw %}

View File

@ -78,20 +78,20 @@
{% if request.user.is_authenticated %} {% if request.user.is_authenticated %}
<li class="nav-item"> <li class="nav-item">
{# URL provided by django-allauth/account/urls.py #} {# URL provided by django-allauth/account/urls.py #}
<a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% trans "My Profile" %}</a> <a class="nav-link" href="{% url 'users:detail' request.user.username %}">{% translate "My Profile" %}</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
{# URL provided by django-allauth/account/urls.py #} {# URL provided by django-allauth/account/urls.py #}
<a class="nav-link" href="{% url 'account_logout' %}">{% trans "Sign Out" %}</a> <a class="nav-link" href="{% url 'account_logout' %}">{% translate "Sign Out" %}</a>
</li> </li>
{% else %} {% else %}
<li class="nav-item"> <li class="nav-item">
{# URL provided by django-allauth/account/urls.py #} {# URL provided by django-allauth/account/urls.py #}
<a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% trans "Sign Up" %}</a> <a id="sign-up-link" class="nav-link" href="{% url 'account_signup' %}">{% translate "Sign Up" %}</a>
</li> </li>
<li class="nav-item"> <li class="nav-item">
{# URL provided by django-allauth/account/urls.py #} {# URL provided by django-allauth/account/urls.py #}
<a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% trans "Sign In" %}</a> <a id="log-in-link" class="nav-link" href="{% url 'account_login' %}">{% translate "Sign In" %}</a>
</li> </li>
{% endif %} {% endif %}
</ul> </ul>