diff --git a/CONTRIBUTORS.rst b/CONTRIBUTORS.rst index 0f9feea6..4c3ad8a0 100644 --- a/CONTRIBUTORS.rst +++ b/CONTRIBUTORS.rst @@ -108,6 +108,7 @@ Listed in alphabetical order. Eric Groom `@ericgroom`_ Eyad Al Sibai `@eyadsibai`_ Felipe Arruda `@arruda`_ + Florian Idelberger `@step21`_ @windrush Garry Cairns `@garry-cairns`_ Garry Polley `@garrypolley`_ Hamish Durkin `@durkode`_ @@ -320,6 +321,7 @@ Listed in alphabetical order. .. _@sladinji: https://github.com/sladinji .. _@slafs: https://github.com/slafs .. _@ssteinerX: https://github.com/ssteinerx +.. _@step21: https://github.com/step21 .. _@stepmr: https://github.com/stepmr .. _@suledev: https://github.com/suledev .. _@takkaria: https://github.com/takkaria diff --git a/requirements.txt b/requirements.txt index e5d371ed..2f85a700 100644 --- a/requirements.txt +++ b/requirements.txt @@ -10,8 +10,8 @@ flake8==3.7.8 # Testing # ------------------------------------------------------------------------------ tox==3.13.2 -pytest==5.0.1 -pytest_cases==1.10.1 +pytest==5.1.1 +pytest_cases==1.11.1 pytest-cookies==0.4.0 pytest-xdist==1.29.0 -pyyaml==5.1.1 +pyyaml==5.1.2 diff --git a/{{cookiecutter.project_slug}}/requirements/base.txt b/{{cookiecutter.project_slug}}/requirements/base.txt index 9513b223..f5c4f338 100644 --- a/{{cookiecutter.project_slug}}/requirements/base.txt +++ b/{{cookiecutter.project_slug}}/requirements/base.txt @@ -1,5 +1,5 @@ -pytz==2019.1 # https://github.com/stub42/pytz -python-slugify==3.0.2 # https://github.com/un33k/python-slugify +pytz==2019.2 # https://github.com/stub42/pytz +python-slugify==3.0.3 # https://github.com/un33k/python-slugify Pillow==6.1.0 # https://github.com/python-pillow/Pillow {%- 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 @@ -8,7 +8,7 @@ argon2-cffi==19.1.0 # https://github.com/hynek/argon2_cffi {%- if cookiecutter.use_whitenoise == 'y' %} whitenoise==4.1.3 # https://github.com/evansd/whitenoise {%- endif %} -redis==3.2.1 # https://github.com/antirez/redis +redis==3.3.8 # https://github.com/antirez/redis {%- if cookiecutter.use_celery == "y" %} 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 @@ -19,7 +19,7 @@ flower==0.9.3 # https://github.com/mher/flower # 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-model-utils==3.2.0 # https://github.com/jazzband/django-model-utils 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 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 diff --git a/{{cookiecutter.project_slug}}/requirements/local.txt b/{{cookiecutter.project_slug}}/requirements/local.txt index cfb2d28f..0a417575 100644 --- a/{{cookiecutter.project_slug}}/requirements/local.txt +++ b/{{cookiecutter.project_slug}}/requirements/local.txt @@ -1,8 +1,8 @@ -r ./base.txt Werkzeug==0.14.1 # pyup: < 0.15 # https://github.com/pallets/werkzeug -ipdb==0.12 # https://github.com/gotcha/ipdb -Sphinx==2.1.2 # https://github.com/sphinx-doc/sphinx +ipdb==0.12.2 # https://github.com/gotcha/ipdb +Sphinx==2.2.0 # https://github.com/sphinx-doc/sphinx {%- if cookiecutter.use_docker == 'y' %} psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- else %} @@ -12,13 +12,13 @@ psycopg2-binary==2.8.3 # https://github.com/psycopg/psycopg2 # Testing # ------------------------------------------------------------------------------ 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 # Code quality # ------------------------------------------------------------------------------ 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 pylint-django==2.0.11 # https://github.com/PyCQA/pylint-django {%- 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 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 pytest-django==3.5.1 # https://github.com/pytest-dev/pytest-django diff --git a/{{cookiecutter.project_slug}}/requirements/production.txt b/{{cookiecutter.project_slug}}/requirements/production.txt index f5e5ffea..eadd410d 100644 --- a/{{cookiecutter.project_slug}}/requirements/production.txt +++ b/{{cookiecutter.project_slug}}/requirements/production.txt @@ -5,10 +5,10 @@ gunicorn==19.9.0 # https://github.com/benoitc/gunicorn psycopg2==2.8.3 --no-binary psycopg2 # https://github.com/psycopg/psycopg2 {%- if cookiecutter.use_whitenoise == 'n' %} -Collectfast==0.6.2 # https://github.com/antonagestam/collectfast +Collectfast==1.0.0 # https://github.com/antonagestam/collectfast {%- endif %} {%- 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 %} # Django diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html similarity index 100% rename from {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403_csrf.html rename to {{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/templates/403.html diff --git a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py index a2442741..5c0d5b5c 100644 --- a/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py +++ b/{{cookiecutter.project_slug}}/{{cookiecutter.project_slug}}/users/views.py @@ -2,6 +2,8 @@ from django.contrib.auth import get_user_model from django.contrib.auth.mixins import LoginRequiredMixin from django.urls import reverse 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() @@ -27,6 +29,12 @@ class UserUpdateView(LoginRequiredMixin, UpdateView): def get_object(self): 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()