From fb70f252c2377dd222eec40c0e8d30f4a39a4f02 Mon Sep 17 00:00:00 2001 From: Ivan Feofanov Date: Sun, 7 Mar 2021 13:27:11 +0500 Subject: [PATCH 1/3] refactor: remove RemovedInDjango40Warning warning message Signed-off-by: Ivan Feofanov --- README.md | 2 +- inline_actions/actions.py | 2 +- inline_actions/admin.py | 2 +- test_proj/blog/admin.py | 2 +- test_proj/blog/models.py | 2 +- test_proj/urls.py | 4 ++-- 6 files changed, 7 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 7e142a3..c097d1a 100644 --- a/README.md +++ b/README.md @@ -131,7 +131,7 @@ Since `unpublish` depends on `article.status` we must use `get_inline_actions` t ```python from django.contrib import admin, messages -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class ArticleInline(InlineActionsMixin, diff --git a/inline_actions/actions.py b/inline_actions/actions.py index 5424171..e48d3b8 100644 --- a/inline_actions/actions.py +++ b/inline_actions/actions.py @@ -3,7 +3,7 @@ from django.contrib import messages from django.shortcuts import redirect from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class ViewAction: diff --git a/inline_actions/admin.py b/inline_actions/admin.py index 6597e7a..4d0f6e8 100755 --- a/inline_actions/admin.py +++ b/inline_actions/admin.py @@ -7,7 +7,7 @@ from django.urls import reverse from django.utils.safestring import mark_safe from django.utils.text import capfirst -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class InlineActionException(Exception): diff --git a/test_proj/blog/admin.py b/test_proj/blog/admin.py index de84f59..36480ca 100755 --- a/test_proj/blog/admin.py +++ b/test_proj/blog/admin.py @@ -1,6 +1,6 @@ from django.contrib import admin, messages from django.shortcuts import render -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from inline_actions.actions import DefaultActionsMixin, ViewAction from inline_actions.admin import InlineActionsMixin, InlineActionsModelAdminMixin diff --git a/test_proj/blog/models.py b/test_proj/blog/models.py index 6b49df9..2514e9d 100644 --- a/test_proj/blog/models.py +++ b/test_proj/blog/models.py @@ -1,5 +1,5 @@ from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class Author(models.Model): diff --git a/test_proj/urls.py b/test_proj/urls.py index ede2ec9..115bf84 100644 --- a/test_proj/urls.py +++ b/test_proj/urls.py @@ -1,6 +1,6 @@ -from django.conf.urls import url from django.contrib import admin +from django.urls import re_path urlpatterns = [ - url(r'^admin/', admin.site.urls), + re_path(r'^admin/', admin.site.urls), ] From 87a3e88bcec98a7f2ceec04d2ca52280559f4429 Mon Sep 17 00:00:00 2001 From: Ivan Feofanov Date: Wed, 17 Mar 2021 07:33:15 +0500 Subject: [PATCH 2/3] Update urls.py --- test_proj/urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test_proj/urls.py b/test_proj/urls.py index 115bf84..dfc7362 100644 --- a/test_proj/urls.py +++ b/test_proj/urls.py @@ -1,6 +1,6 @@ from django.contrib import admin -from django.urls import re_path +from django.urls import path urlpatterns = [ - re_path(r'^admin/', admin.site.urls), + path('admin/', admin.site.urls), ] From a9410a67e9932152d65a063bea0848c98f5c8d73 Mon Sep 17 00:00:00 2001 From: Ivan Feofanov Date: Thu, 18 Mar 2021 19:23:22 +0500 Subject: [PATCH 3/3] Update CONTRIBUTORS.md --- CONTRIBUTORS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index dc34f60..e468005 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -8,3 +8,4 @@ - [@sobolevn](https://github.com/sobolevn) - [@tony](https://github.com/tony) - [@tripliks](https://github.com/tripliks) +- [@Ivan-Feofanov](https://github.com/Ivan-Feofanov)