|
1 |
| -from __future__ import unicode_literals |
2 |
| - |
3 | 1 | import logging
|
4 | 2 |
|
5 | 3 | from django.urls import path
|
6 | 4 |
|
7 | 5 | logger = logging.getLogger(__name__)
|
8 | 6 |
|
9 |
| -import six |
10 |
| - |
11 | 7 | from django.db import models
|
12 | 8 |
|
13 | 9 | from django.conf import settings
|
@@ -98,7 +94,7 @@ def admin_submissions(self, obj):
|
98 | 94 | admin_submissions.short_description = ''
|
99 | 95 |
|
100 | 96 |
|
101 |
| -class NewsletterAdminLinkMixin(object): |
| 97 | +class NewsletterAdminLinkMixin: |
102 | 98 | def admin_newsletter(self, obj):
|
103 | 99 | opts = Newsletter._meta
|
104 | 100 | newsletter = obj.newsletter
|
@@ -192,7 +188,7 @@ def submit(self, request, object_id):
|
192 | 188 |
|
193 | 189 | """ URLs """
|
194 | 190 | def get_urls(self):
|
195 |
| - urls = super(SubmissionAdmin, self).get_urls() |
| 191 | + urls = super().get_urls() |
196 | 192 |
|
197 | 193 | my_urls = [
|
198 | 194 | path(
|
@@ -240,7 +236,7 @@ def has_change_permission(self, request, obj=None):
|
240 | 236 | else:
|
241 | 237 | ArticleInlineClassTuple = (StackedInline,)
|
242 | 238 |
|
243 |
| -BaseArticleInline = type(str('BaseArticleInline'), ArticleInlineClassTuple, {}) |
| 239 | +BaseArticleInline = type('BaseArticleInline', ArticleInlineClassTuple, {}) |
244 | 240 |
|
245 | 241 | class ArticleInline(BaseArticleInline):
|
246 | 242 | model = Article
|
@@ -361,7 +357,7 @@ def subscribers_json(self, request, object_id):
|
361 | 357 |
|
362 | 358 | """ URLs """
|
363 | 359 | def get_urls(self):
|
364 |
| - urls = super(MessageAdmin, self).get_urls() |
| 360 | + urls = super().get_urls() |
365 | 361 |
|
366 | 362 | my_urls = [
|
367 | 363 | path('<object_id>/preview/',
|
@@ -509,7 +505,7 @@ def subscribers_import_confirm(self, request):
|
509 | 505 | form = ConfirmForm(request.POST)
|
510 | 506 | if form.is_valid():
|
511 | 507 | try:
|
512 |
| - for email, name in six.iteritems(addresses): |
| 508 | + for email, name in addresses.items(): |
513 | 509 | address_inst = make_subscription(
|
514 | 510 | newsletter, email, name
|
515 | 511 | )
|
@@ -542,7 +538,7 @@ def subscribers_import_confirm(self, request):
|
542 | 538 |
|
543 | 539 | """ URLs """
|
544 | 540 | def get_urls(self):
|
545 |
| - urls = super(SubscriptionAdmin, self).get_urls() |
| 541 | + urls = super().get_urls() |
546 | 542 |
|
547 | 543 | my_urls = [
|
548 | 544 | path('import/',
|
|
0 commit comments