diff options
author | Filipp Lepalaan <filipp@mac.com> | 2021-05-12 14:51:24 +0300 |
---|---|---|
committer | Filipp Lepalaan <filipp@mac.com> | 2021-05-12 14:51:24 +0300 |
commit | 0544a119af72235ef7ff5558fc519205dcf2ec49 (patch) | |
tree | 45907310a28d32fce224ab4f6a25c7b6c9423f1d | |
parent | a65840f3c944c099b9d1b36bbbbc78e9395a58e7 (diff) | |
download | Servo-0544a119af72235ef7ff5558fc519205dcf2ec49.tar.gz Servo-0544a119af72235ef7ff5558fc519205dcf2ec49.tar.bz2 Servo-0544a119af72235ef7ff5558fc519205dcf2ec49.zip |
Django 3 fixes
-rw-r--r-- | servo/models/product.py | 4 | ||||
-rw-r--r-- | servo/models/purchases.py | 2 | ||||
-rw-r--r-- | servo/models/queue.py | 2 | ||||
-rw-r--r-- | servo/models/repair.py | 2 | ||||
-rw-r--r-- | servo/models/rules.py | 2 | ||||
-rwxr-xr-x | servo/tests/test_unit.py | 2 | ||||
-rw-r--r-- | servo/views/account.py | 2 | ||||
-rw-r--r-- | servo/views/order.py | 2 | ||||
-rw-r--r-- | servo/views/search.py | 2 |
9 files changed, 10 insertions, 10 deletions
diff --git a/servo/models/product.py b/servo/models/product.py index aa20cc9..189ca8a 100644 --- a/servo/models/product.py +++ b/servo/models/product.py @@ -9,7 +9,7 @@ from django.conf import settings from django.core.files import File from django.core.cache import cache from decimal import Decimal, ROUND_CEILING -from django.core.urlresolvers import reverse +from django.urls import reverse from django.contrib.sites.models import Site from django.contrib.contenttypes.fields import GenericRelation @@ -533,7 +533,7 @@ class Product(AbstractBaseProduct): filename = basename(result) self.photo.save(filename, File(open(result))) except Exception as e: - print e + print(e) def __unicode__(self): return u'%s %s' % (self.code, self.title) diff --git a/servo/models/purchases.py b/servo/models/purchases.py index d32c936..015e12c 100644 --- a/servo/models/purchases.py +++ b/servo/models/purchases.py @@ -100,7 +100,7 @@ class PurchaseOrder(models.Model): pass def get_absolute_url(self): - from django.core.urlresolvers import reverse + from django.urls import reverse if self.submitted_at: return reverse("purchases-view_po", args=[self.pk]) diff --git a/servo/models/queue.py b/servo/models/queue.py index 7650f46..79fcb87 100644 --- a/servo/models/queue.py +++ b/servo/models/queue.py @@ -4,7 +4,7 @@ from datetime import timedelta from django.db import models from django.utils import timezone -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.contrib.sites.models import Site diff --git a/servo/models/repair.py b/servo/models/repair.py index 2276945..e817eb2 100644 --- a/servo/models/repair.py +++ b/servo/models/repair.py @@ -9,7 +9,7 @@ from gsxws.repairs import SymptomIssue from django.db import models from django.conf import settings from django.utils import timezone -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from django.core.validators import MaxLengthValidator diff --git a/servo/models/rules.py b/servo/models/rules.py index 460a0b6..26fab03 100644 --- a/servo/models/rules.py +++ b/servo/models/rules.py @@ -7,7 +7,7 @@ from django.core.cache import cache from django.dispatch import receiver from django.db.models.signals import post_save -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from servo.models import Event, Queue diff --git a/servo/tests/test_unit.py b/servo/tests/test_unit.py index 5e4daf3..b304c61 100755 --- a/servo/tests/test_unit.py +++ b/servo/tests/test_unit.py @@ -3,7 +3,7 @@ import unittest from django.http import HttpRequest -from django.core.urlresolvers import resolve +from django.urls import resolve from django.test import TestCase from django.test.runner import DiscoverRunner diff --git a/servo/views/account.py b/servo/views/account.py index 2b50959..ae82975 100644 --- a/servo/views/account.py +++ b/servo/views/account.py @@ -7,7 +7,7 @@ from django.contrib import auth from django.utils import timezone, translation from django.contrib import messages -from django.core.urlresolvers import reverse +from django.urls import reverse from django.http import QueryDict, HttpResponse from dateutil.relativedelta import relativedelta from django.utils.translation import ugettext as _ diff --git a/servo/views/order.py b/servo/views/order.py index 6853ee4..ff1c216 100644 --- a/servo/views/order.py +++ b/servo/views/order.py @@ -15,7 +15,7 @@ from django.http import HttpResponse from django.db import DatabaseError -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from django.shortcuts import render, redirect, get_object_or_404 diff --git a/servo/views/search.py b/servo/views/search.py index 43f840f..0fd75aa 100644 --- a/servo/views/search.py +++ b/servo/views/search.py @@ -7,7 +7,7 @@ from django.db.models import Q from django.core.cache import cache from django.contrib import messages from django.shortcuts import render, redirect -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext as _ from django.http import QueryDict, HttpResponseRedirect |