mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-17 18:34:52 +03:00
Merge branch 'pydanny:master' into master
This commit is contained in:
commit
253fe5f76a
20
.github/contributors.json
vendored
20
.github/contributors.json
vendored
|
@ -1107,5 +1107,25 @@
|
|||
"name": "Haseeb ur Rehman",
|
||||
"github_login": "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": ""
|
||||
}
|
||||
]
|
||||
|
|
21
CHANGELOG.md
21
CHANGELOG.md
|
@ -3,6 +3,27 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
|||
|
||||
<!-- GENERATOR_PLACEHOLDER -->
|
||||
|
||||
## [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]
|
||||
### Changed
|
||||
- Define REMAP_SIGTERM=SIGQUIT on Profile of Celery on Heroku ([#3263](https://api.github.com/repos/pydanny/cookiecutter-django/pulls/3263))
|
||||
|
|
|
@ -124,6 +124,13 @@ Listed in alphabetical order.
|
|||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Abdul Qoyyuum</td>
|
||||
<td>
|
||||
<a href="https://github.com/Qoyyuum">Qoyyuum</a>
|
||||
</td>
|
||||
<td>Qoyyuum</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Adam Bogdał</td>
|
||||
<td>
|
||||
|
@ -950,6 +957,13 @@ Listed in alphabetical order.
|
|||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Keith Callenberg</td>
|
||||
<td>
|
||||
<a href="https://github.com/keithcallenberg">keithcallenberg</a>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Keith Webber</td>
|
||||
<td>
|
||||
|
@ -1167,6 +1181,13 @@ Listed in alphabetical order.
|
|||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>mfosterw</td>
|
||||
<td>
|
||||
<a href="https://github.com/mfosterw">mfosterw</a>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Michael Gecht</td>
|
||||
<td>
|
||||
|
@ -1181,6 +1202,13 @@ Listed in alphabetical order.
|
|||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mike97M</td>
|
||||
<td>
|
||||
<a href="https://github.com/Mike97M">Mike97M</a>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Min ho Kim</td>
|
||||
<td>
|
||||
|
|
|
@ -18,10 +18,11 @@ Prerequisites
|
|||
|
||||
* Docker; if you don't have it yet, follow the `installation instructions`_;
|
||||
* 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 guide`: https://docs.docker.com/compose/install/
|
||||
|
||||
.. _`pre-commit`: https://pre-commit.com/#install
|
||||
|
||||
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!
|
||||
|
||||
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
|
||||
-------------
|
||||
|
|
|
@ -30,6 +30,7 @@ First things first.
|
|||
|
||||
#. Install development requirements: ::
|
||||
|
||||
$ cd <what you have entered as the project_slug at setup stage>
|
||||
$ pip install -r requirements/local.txt
|
||||
$ git init # A git repo is required for pre-commit to install
|
||||
$ pre-commit install
|
||||
|
|
|
@ -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 .
|
||||
|
||||
.. _`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
|
||||
----------------------------------
|
||||
|
|
|
@ -4,15 +4,15 @@ binaryornot==0.4.4
|
|||
|
||||
# Code quality
|
||||
# ------------------------------------------------------------------------------
|
||||
black==21.6b0
|
||||
isort==5.9.1
|
||||
black==21.7b0
|
||||
isort==5.9.3
|
||||
flake8==3.9.2
|
||||
flake8-isort==4.0.0
|
||||
pre-commit==2.13.0
|
||||
pre-commit==2.14.0
|
||||
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
tox==3.23.1
|
||||
tox==3.24.1
|
||||
pytest==6.2.4
|
||||
pytest-cookies==0.6.1
|
||||
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
|
||||
# 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":
|
||||
os.system(f'git tag -a {version} -m "version {version}"')
|
||||
|
|
|
@ -12,18 +12,6 @@ trim_trailing_whitespace = true
|
|||
indent_style = space
|
||||
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}]
|
||||
indent_style = space
|
||||
indent_size = 2
|
||||
|
|
|
@ -11,12 +11,12 @@ repos:
|
|||
- id: check-yaml
|
||||
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 21.6b0
|
||||
rev: 21.7b0
|
||||
hooks:
|
||||
- id: black
|
||||
|
||||
- repo: https://github.com/timothycrosley/isort
|
||||
rev: 5.9.1
|
||||
rev: 5.9.3
|
||||
hooks:
|
||||
- id: isort
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
pytz==2021.1 # https://github.com/stub42/pytz
|
||||
python-slugify==5.0.2 # https://github.com/un33k/python-slugify
|
||||
Pillow==8.2.0 # https://github.com/python-pillow/Pillow
|
||||
Pillow==8.3.1 # https://github.com/python-pillow/Pillow
|
||||
{%- if cookiecutter.use_compressor == "y" %}
|
||||
{%- if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %}
|
||||
rcssmin==1.0.6 --install-option="--without-c-extensions" # https://github.com/ndparker/rcssmin
|
||||
|
@ -10,11 +10,11 @@ rcssmin==1.0.6 # https://github.com/ndparker/rcssmin
|
|||
{%- endif %}
|
||||
argon2-cffi==20.1.0 # https://github.com/hynek/argon2_cffi
|
||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||
whitenoise==5.2.0 # https://github.com/evansd/whitenoise
|
||||
whitenoise==5.3.0 # https://github.com/evansd/whitenoise
|
||||
{%- endif %}
|
||||
redis==3.5.3 # https://github.com/andymccurdy/redis-py
|
||||
{%- if cookiecutter.use_docker == "y" or cookiecutter.windows == "n" %}
|
||||
hiredis==1.1.0 # https://github.com/redis/hiredis-py
|
||||
hiredis==2.0.0 # https://github.com/redis/hiredis-py
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_celery == "y" %}
|
||||
celery==4.4.6 # pyup: < 5.0,!=4.4.7 # https://github.com/celery/celery
|
||||
|
@ -32,7 +32,7 @@ uvicorn[standard]==0.14.0 # https://github.com/encode/uvicorn
|
|||
django==3.1.13 # pyup: < 3.2 # https://www.djangoproject.com/
|
||||
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-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
|
||||
{%- if cookiecutter.use_compressor == "y" %}
|
||||
django-compressor==2.4.1 # https://github.com/django-compressor/django-compressor
|
||||
|
|
|
@ -13,14 +13,14 @@ watchgod==0.7 # https://github.com/samuelcolvin/watchgod
|
|||
|
||||
# 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
|
||||
pytest==6.2.4 # https://github.com/pytest-dev/pytest
|
||||
pytest-sugar==0.9.4 # https://github.com/Frozenball/pytest-sugar
|
||||
|
||||
# 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
|
||||
|
||||
# Code quality
|
||||
|
@ -28,12 +28,12 @@ sphinx-autobuild==2021.3.14 # https://github.com/GaretJax/sphinx-autobuild
|
|||
flake8==3.9.2 # https://github.com/PyCQA/flake8
|
||||
flake8-isort==4.0.0 # https://github.com/gforcada/flake8-isort
|
||||
coverage==5.5 # https://github.com/nedbat/coveragepy
|
||||
black==21.6b0 # https://github.com/psf/black
|
||||
black==21.7b0 # https://github.com/psf/black
|
||||
pylint-django==2.4.4 # https://github.com/PyCQA/pylint-django
|
||||
{%- if cookiecutter.use_celery == 'y' %}
|
||||
pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
||||
{%- endif %}
|
||||
pre-commit==2.13.0 # https://github.com/pre-commit/pre-commit
|
||||
pre-commit==2.14.0 # https://github.com/pre-commit/pre-commit
|
||||
|
||||
# Django
|
||||
# ------------------------------------------------------------------------------
|
||||
|
|
|
@ -8,10 +8,10 @@ psycopg2==2.9.1 # https://github.com/psycopg/psycopg2
|
|||
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
|
||||
{%- endif %}
|
||||
{%- 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 %}
|
||||
{%- 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 %}
|
||||
|
||||
# Django
|
||||
|
|
|
@ -6,6 +6,17 @@ exclude = .tox,.git,*/migrations/*,*/static/CACHE/*,docs,node_modules,venv
|
|||
max-line-length = 120
|
||||
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]
|
||||
python_version = 3.9
|
||||
check_untyped_defs = True
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Account Inactive" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Account Inactive" %}{% endblock %}
|
||||
|
||||
{% 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 %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head_title %}{% trans "Account" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Account" %}{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
<h1>{% trans "E-mail Addresses" %}</h1>
|
||||
<h1>{% translate "E-mail Addresses" %}</h1>
|
||||
|
||||
{% 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">
|
||||
{% csrf_token %}
|
||||
|
@ -24,36 +24,36 @@
|
|||
|
||||
{{ emailaddress.email }}
|
||||
{% if emailaddress.verified %}
|
||||
<span class="verified">{% trans "Verified" %}</span>
|
||||
<span class="verified">{% translate "Verified" %}</span>
|
||||
{% else %}
|
||||
<span class="unverified">{% trans "Unverified" %}</span>
|
||||
<span class="unverified">{% translate "Unverified" %}</span>
|
||||
{% endif %}
|
||||
{% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %}
|
||||
{% if emailaddress.primary %}<span class="primary">{% translate "Primary" %}</span>{% endif %}
|
||||
</label>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<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_send" >{% trans 'Re-send Verification' %}</button>
|
||||
<button class="primaryAction btn btn-primary" type="submit" name="action_remove" >{% trans 'Remove' %}</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" >{% translate 'Re-send Verification' %}</button>
|
||||
<button class="primaryAction btn btn-primary" type="submit" name="action_remove" >{% translate 'Remove' %}</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% 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 %}
|
||||
|
||||
|
||||
<h2>{% trans "Add E-mail Address" %}</h2>
|
||||
<h2>{% translate "Add E-mail Address" %}</h2>
|
||||
|
||||
<form method="post" action="{% url 'account_email' %}" class="add_email">
|
||||
{% csrf_token %}
|
||||
{{ 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>
|
||||
|
||||
{% endblock %}
|
||||
|
@ -63,7 +63,7 @@
|
|||
{{ block.super }}
|
||||
<script type="text/javascript">
|
||||
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');
|
||||
if (actions.length) {
|
||||
actions[0].addEventListener("click", function(e) {
|
||||
|
|
|
@ -3,28 +3,28 @@
|
|||
{% load i18n %}
|
||||
{% load account %}
|
||||
|
||||
{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Confirm E-mail Address" %}{% endblock %}
|
||||
|
||||
|
||||
{% block inner %}
|
||||
<h1>{% trans "Confirm E-mail Address" %}</h1>
|
||||
<h1>{% translate "Confirm E-mail Address" %}</h1>
|
||||
|
||||
{% if confirmation %}
|
||||
|
||||
{% 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 %}">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-primary" type="submit">{% trans 'Confirm' %}</button>
|
||||
<button class="btn btn-primary" type="submit">{% translate 'Confirm' %}</button>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
|
||||
{% 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 %}
|
||||
|
||||
|
|
|
@ -4,18 +4,18 @@
|
|||
{% load account socialaccount %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head_title %}{% trans "Sign In" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Sign In" %}{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
|
||||
<h1>{% trans "Sign In" %}</h1>
|
||||
<h1>{% translate "Sign In" %}</h1>
|
||||
|
||||
{% get_providers as 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>
|
||||
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">
|
||||
|
||||
|
@ -23,15 +23,15 @@ for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
|
|||
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
||||
</ul>
|
||||
|
||||
<div class="login-or">{% trans 'or' %}</div>
|
||||
<div class="login-or">{% translate 'or' %}</div>
|
||||
|
||||
</div>
|
||||
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
|
||||
{% else %}
|
||||
<p>{% blocktrans %}If you have not created an account yet, then please
|
||||
<a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
|
||||
<p>{% blocktranslate %}If you have not created an account yet, then please
|
||||
<a href="{{ signup_url }}">sign up</a> first.{% endblocktranslate %}</p>
|
||||
{% endif %}
|
||||
|
||||
<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 %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
|
||||
<button class="primaryAction btn btn-primary" type="submit">{% trans "Sign In" %}</button>
|
||||
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% translate "Forgot Password?" %}</a>
|
||||
<button class="primaryAction btn btn-primary" type="submit">{% translate "Sign In" %}</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,19 +2,19 @@
|
|||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Sign Out" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Sign Out" %}{% endblock %}
|
||||
|
||||
{% 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' %}">
|
||||
{% csrf_token %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}"/>
|
||||
{% endif %}
|
||||
<button class="btn btn-danger" type="submit">{% trans 'Sign Out' %}</button>
|
||||
<button class="btn btn-danger" type="submit">{% translate 'Sign Out' %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Change Password" %}{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
<h1>{% trans "Change Password" %}</h1>
|
||||
<h1>{% translate "Change Password" %}</h1>
|
||||
|
||||
<form method="POST" action="{% url 'account_change_password' %}" class="password_change">
|
||||
{% csrf_token %}
|
||||
{{ 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>
|
||||
{% endblock %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -4,23 +4,23 @@
|
|||
{% load account %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Password Reset" %}{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
|
||||
<h1>{% trans "Password Reset" %}</h1>
|
||||
<h1>{% translate "Password Reset" %}</h1>
|
||||
{% if user.is_authenticated %}
|
||||
{% include "account/snippets/already_logged_in.html" %}
|
||||
{% 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">
|
||||
{% csrf_token %}
|
||||
{{ 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>
|
||||
|
||||
<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 %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
{% load i18n %}
|
||||
{% load account %}
|
||||
|
||||
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Password Reset" %}{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
<h1>{% trans "Password Reset" %}</h1>
|
||||
<h1>{% translate "Password Reset" %}</h1>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
{% include "account/snippets/already_logged_in.html" %}
|
||||
{% 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 %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -2,23 +2,23 @@
|
|||
|
||||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Change Password" %}{% endblock %}
|
||||
|
||||
{% 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 %}
|
||||
{% 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 %}
|
||||
{% if form %}
|
||||
<form method="POST" action=".">
|
||||
{% csrf_token %}
|
||||
{{ 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>
|
||||
{% else %}
|
||||
<p>{% trans 'Your password is now changed.' %}</p>
|
||||
<p>{% translate 'Your password is now changed.' %}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
{% raw %}{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Change Password" %}{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
<h1>{% trans "Change Password" %}</h1>
|
||||
<p>{% trans 'Your password is now changed.' %}</p>
|
||||
<h1>{% translate "Change Password" %}</h1>
|
||||
<p>{% translate 'Your password is now changed.' %}</p>
|
||||
{% endblock %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -3,15 +3,15 @@
|
|||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head_title %}{% trans "Set Password" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Set Password" %}{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
<h1>{% trans "Set Password" %}</h1>
|
||||
<h1>{% translate "Set Password" %}</h1>
|
||||
|
||||
<form method="POST" action="{% url 'account_set_password' %}" class="password_set">
|
||||
{% csrf_token %}
|
||||
{{ 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>
|
||||
{% endblock %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
{% load i18n %}
|
||||
{% load crispy_forms_tags %}
|
||||
|
||||
{% block head_title %}{% trans "Signup" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Signup" %}{% endblock %}
|
||||
|
||||
{% 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' %}">
|
||||
{% csrf_token %}
|
||||
|
@ -16,7 +16,7 @@
|
|||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<button class="btn btn-primary" type="submit">{% trans "Sign Up" %} »</button>
|
||||
<button class="btn btn-primary" type="submit">{% translate "Sign Up" %} »</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
|
|
@ -2,11 +2,11 @@
|
|||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Sign Up Closed" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Sign Up Closed" %}{% endblock %}
|
||||
|
||||
{% 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 %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -2,12 +2,12 @@
|
|||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Verify Your E-mail Address" %}{% endblock %}
|
||||
|
||||
{% 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 %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -2,21 +2,21 @@
|
|||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Verify Your E-mail Address" %}{% endblock %}
|
||||
{% block head_title %}{% translate "Verify Your E-mail Address" %}{% endblock %}
|
||||
|
||||
{% block inner %}
|
||||
<h1>{% trans "Verify Your E-mail Address" %}</h1>
|
||||
<h1>{% translate "Verify Your E-mail Address" %}</h1>
|
||||
|
||||
{% 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
|
||||
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
|
||||
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 %}
|
||||
{%- endraw %}
|
||||
|
|
|
@ -78,20 +78,20 @@
|
|||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
{# 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 class="nav-item">
|
||||
{# 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>
|
||||
{% else %}
|
||||
<li class="nav-item">
|
||||
{# 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 class="nav-item">
|
||||
{# 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>
|
||||
{% endif %}
|
||||
</ul>
|
||||
|
|
Loading…
Reference in New Issue
Block a user