mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-02-20 05:20:55 +03:00
Merge commit '383e3ae2f03983e7142524f6079b9740a025096d'
This commit is contained in:
commit
5f334d42d5
|
@ -108,6 +108,7 @@ Listed in alphabetical order.
|
||||||
Eric Groom `@ericgroom`_
|
Eric Groom `@ericgroom`_
|
||||||
Eyad Al Sibai `@eyadsibai`_
|
Eyad Al Sibai `@eyadsibai`_
|
||||||
Felipe Arruda `@arruda`_
|
Felipe Arruda `@arruda`_
|
||||||
|
Florian Idelberger `@step21`_ @windrush
|
||||||
Garry Cairns `@garry-cairns`_
|
Garry Cairns `@garry-cairns`_
|
||||||
Garry Polley `@garrypolley`_
|
Garry Polley `@garrypolley`_
|
||||||
Hamish Durkin `@durkode`_
|
Hamish Durkin `@durkode`_
|
||||||
|
@ -320,6 +321,7 @@ Listed in alphabetical order.
|
||||||
.. _@sladinji: https://github.com/sladinji
|
.. _@sladinji: https://github.com/sladinji
|
||||||
.. _@slafs: https://github.com/slafs
|
.. _@slafs: https://github.com/slafs
|
||||||
.. _@ssteinerX: https://github.com/ssteinerx
|
.. _@ssteinerX: https://github.com/ssteinerx
|
||||||
|
.. _@step21: https://github.com/step21
|
||||||
.. _@stepmr: https://github.com/stepmr
|
.. _@stepmr: https://github.com/stepmr
|
||||||
.. _@suledev: https://github.com/suledev
|
.. _@suledev: https://github.com/suledev
|
||||||
.. _@takkaria: https://github.com/takkaria
|
.. _@takkaria: https://github.com/takkaria
|
||||||
|
|
|
@ -10,8 +10,8 @@ flake8==3.7.8
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
tox==3.13.2
|
tox==3.13.2
|
||||||
pytest==5.0.1
|
pytest==5.1.1
|
||||||
pytest_cases==1.10.1
|
pytest_cases==1.11.1
|
||||||
pytest-cookies==0.4.0
|
pytest-cookies==0.4.0
|
||||||
pytest-xdist==1.29.0
|
pytest-xdist==1.29.0
|
||||||
pyyaml==5.1.1
|
pyyaml==5.1.2
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
pytz==2019.1 # https://github.com/stub42/pytz
|
pytz==2019.2 # https://github.com/stub42/pytz
|
||||||
python-slugify==3.0.2 # https://github.com/un33k/python-slugify
|
python-slugify==3.0.3 # https://github.com/un33k/python-slugify
|
||||||
Pillow==6.1.0 # https://github.com/python-pillow/Pillow
|
Pillow==6.1.0 # https://github.com/python-pillow/Pillow
|
||||||
{%- if cookiecutter.use_compressor == "y" %}
|
{%- if cookiecutter.use_compressor == "y" %}
|
||||||
rcssmin==1.0.6{% if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} --install-option="--without-c-extensions"{% endif %} # https://github.com/ndparker/rcssmin
|
rcssmin==1.0.6{% if cookiecutter.windows == 'y' and cookiecutter.use_docker == 'n' %} --install-option="--without-c-extensions"{% endif %} # https://github.com/ndparker/rcssmin
|
||||||
|
@ -8,7 +8,7 @@ argon2-cffi==19.1.0 # https://github.com/hynek/argon2_cffi
|
||||||
{%- if cookiecutter.use_whitenoise == 'y' %}
|
{%- if cookiecutter.use_whitenoise == 'y' %}
|
||||||
whitenoise==4.1.3 # https://github.com/evansd/whitenoise
|
whitenoise==4.1.3 # https://github.com/evansd/whitenoise
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
redis==3.2.1 # https://github.com/antirez/redis
|
redis==3.3.8 # https://github.com/antirez/redis
|
||||||
{%- if cookiecutter.use_celery == "y" %}
|
{%- if cookiecutter.use_celery == "y" %}
|
||||||
celery==4.3.0 # pyup: < 5.0 # https://github.com/celery/celery
|
celery==4.3.0 # pyup: < 5.0 # https://github.com/celery/celery
|
||||||
django-celery-beat==1.5.0 # https://github.com/celery/django-celery-beat
|
django-celery-beat==1.5.0 # https://github.com/celery/django-celery-beat
|
||||||
|
@ -19,7 +19,7 @@ flower==0.9.3 # https://github.com/mher/flower
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
django==2.2.3 # pyup: < 3.0 # https://www.djangoproject.com/
|
django==2.2.4 # pyup: < 3.0 # 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==3.2.0 # https://github.com/jazzband/django-model-utils
|
django-model-utils==3.2.0 # https://github.com/jazzband/django-model-utils
|
||||||
django-allauth==0.39.1 # https://github.com/pennersr/django-allauth
|
django-allauth==0.39.1 # https://github.com/pennersr/django-allauth
|
||||||
|
@ -30,5 +30,5 @@ django-compressor==2.3 # https://github.com/django-compressor/django-compressor
|
||||||
django-redis==4.10.0 # https://github.com/niwinz/django-redis
|
django-redis==4.10.0 # https://github.com/niwinz/django-redis
|
||||||
|
|
||||||
# Django REST Framework
|
# Django REST Framework
|
||||||
djangorestframework==3.10.0 # https://github.com/encode/django-rest-framework
|
djangorestframework==3.10.2 # https://github.com/encode/django-rest-framework
|
||||||
coreapi==2.3.3 # https://github.com/core-api/python-client
|
coreapi==2.3.3 # https://github.com/core-api/python-client
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
-r ./base.txt
|
-r ./base.txt
|
||||||
|
|
||||||
Werkzeug==0.14.1 # pyup: < 0.15 # https://github.com/pallets/werkzeug
|
Werkzeug==0.14.1 # pyup: < 0.15 # https://github.com/pallets/werkzeug
|
||||||
ipdb==0.12 # https://github.com/gotcha/ipdb
|
ipdb==0.12.2 # https://github.com/gotcha/ipdb
|
||||||
Sphinx==2.1.2 # https://github.com/sphinx-doc/sphinx
|
Sphinx==2.2.0 # https://github.com/sphinx-doc/sphinx
|
||||||
{%- if cookiecutter.use_docker == 'y' %}
|
{%- if cookiecutter.use_docker == 'y' %}
|
||||||
psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
||||||
{%- else %}
|
{%- else %}
|
||||||
|
@ -12,13 +12,13 @@ psycopg2-binary==2.8.3 # https://github.com/psycopg/psycopg2
|
||||||
# Testing
|
# Testing
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
mypy==0.720 # https://github.com/python/mypy
|
mypy==0.720 # https://github.com/python/mypy
|
||||||
pytest==5.0.1 # https://github.com/pytest-dev/pytest
|
pytest==5.1.1 # https://github.com/pytest-dev/pytest
|
||||||
pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar
|
pytest-sugar==0.9.2 # https://github.com/Frozenball/pytest-sugar
|
||||||
|
|
||||||
# Code quality
|
# Code quality
|
||||||
# ------------------------------------------------------------------------------
|
# ------------------------------------------------------------------------------
|
||||||
flake8==3.7.8 # https://github.com/PyCQA/flake8
|
flake8==3.7.8 # https://github.com/PyCQA/flake8
|
||||||
coverage==4.5.3 # https://github.com/nedbat/coveragepy
|
coverage==4.5.4 # https://github.com/nedbat/coveragepy
|
||||||
black==19.3b0 # https://github.com/ambv/black
|
black==19.3b0 # https://github.com/ambv/black
|
||||||
pylint-django==2.0.11 # https://github.com/PyCQA/pylint-django
|
pylint-django==2.0.11 # https://github.com/PyCQA/pylint-django
|
||||||
{%- if cookiecutter.use_celery == 'y' %}
|
{%- if cookiecutter.use_celery == 'y' %}
|
||||||
|
@ -30,6 +30,6 @@ pylint-celery==0.3 # https://github.com/PyCQA/pylint-celery
|
||||||
factory-boy==2.12.0 # https://github.com/FactoryBoy/factory_boy
|
factory-boy==2.12.0 # https://github.com/FactoryBoy/factory_boy
|
||||||
|
|
||||||
django-debug-toolbar==2.0 # https://github.com/jazzband/django-debug-toolbar
|
django-debug-toolbar==2.0 # https://github.com/jazzband/django-debug-toolbar
|
||||||
django-extensions==2.1.9 # https://github.com/django-extensions/django-extensions
|
django-extensions==2.2.1 # https://github.com/django-extensions/django-extensions
|
||||||
django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin
|
django-coverage-plugin==1.6.0 # https://github.com/nedbat/django_coverage_plugin
|
||||||
pytest-django==3.5.1 # https://github.com/pytest-dev/pytest-django
|
pytest-django==3.5.1 # https://github.com/pytest-dev/pytest-django
|
||||||
|
|
|
@ -5,10 +5,10 @@
|
||||||
gunicorn==19.9.0 # https://github.com/benoitc/gunicorn
|
gunicorn==19.9.0 # https://github.com/benoitc/gunicorn
|
||||||
psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2
|
||||||
{%- if cookiecutter.use_whitenoise == 'n' %}
|
{%- if cookiecutter.use_whitenoise == 'n' %}
|
||||||
Collectfast==0.6.2 # https://github.com/antonagestam/collectfast
|
Collectfast==1.0.0 # https://github.com/antonagestam/collectfast
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
{%- if cookiecutter.use_sentry == "y" %}
|
{%- if cookiecutter.use_sentry == "y" %}
|
||||||
sentry-sdk==0.10.2 # https://github.com/getsentry/sentry-python
|
sentry-sdk==0.11.1 # https://github.com/getsentry/sentry-python
|
||||||
{%- endif %}
|
{%- endif %}
|
||||||
|
|
||||||
# Django
|
# Django
|
||||||
|
|
|
@ -2,6 +2,8 @@ from django.contrib.auth import get_user_model
|
||||||
from django.contrib.auth.mixins import LoginRequiredMixin
|
from django.contrib.auth.mixins import LoginRequiredMixin
|
||||||
from django.urls import reverse
|
from django.urls import reverse
|
||||||
from django.views.generic import DetailView, RedirectView, UpdateView
|
from django.views.generic import DetailView, RedirectView, UpdateView
|
||||||
|
from django.contrib import messages
|
||||||
|
from django.utils.translation import ugettext_lazy as _
|
||||||
|
|
||||||
User = get_user_model()
|
User = get_user_model()
|
||||||
|
|
||||||
|
@ -27,6 +29,12 @@ class UserUpdateView(LoginRequiredMixin, UpdateView):
|
||||||
def get_object(self):
|
def get_object(self):
|
||||||
return User.objects.get(username=self.request.user.username)
|
return User.objects.get(username=self.request.user.username)
|
||||||
|
|
||||||
|
def form_valid(self, form):
|
||||||
|
messages.add_message(
|
||||||
|
self.request, messages.INFO, _("Infos successfully updated")
|
||||||
|
)
|
||||||
|
return super().form_valid(form)
|
||||||
|
|
||||||
|
|
||||||
user_update_view = UserUpdateView.as_view()
|
user_update_view = UserUpdateView.as_view()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user