From 5295e88be1a5d3ac1aa94ae267d839e58cc92c5d Mon Sep 17 00:00:00 2001 From: Filipp Lepalaan Date: Wed, 12 May 2021 15:32:50 +0300 Subject: Django 3 fixes --- servo/forms/__init__.py | 12 ++++++------ servo/forms/checkin.py | 4 ++-- servo/forms/notes.py | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'servo/forms') diff --git a/servo/forms/__init__.py b/servo/forms/__init__.py index 0c8f2d5..243075b 100644 --- a/servo/forms/__init__.py +++ b/servo/forms/__init__.py @@ -1,9 +1,9 @@ # -*- coding: utf-8 -*- -from base import * -from orders import * -from notes import * -from devices import * -from product import * -from repairs import * +from .base import * +from .orders import * +from .notes import * +from .devices import * +from .product import * +from .repairs import * from .checkin import * diff --git a/servo/forms/checkin.py b/servo/forms/checkin.py index b3ed0d0..8cd19c4 100644 --- a/servo/forms/checkin.py +++ b/servo/forms/checkin.py @@ -8,7 +8,7 @@ from django.conf import settings from django_countries import countries from django.core.validators import RegexValidator from django.utils.translation import ugettext_lazy as _ -from django.forms.extras.widgets import SelectDateWidget +from django.forms import SelectDateWidget from servo.validators import (apple_sn_validator, phone_validator, @@ -22,7 +22,7 @@ from servo.models import (Configuration, Device, # Generate list of years for purchase date picker y = date.today().year -YEARS = [x + 1 for x in xrange(y - 10, y)] +YEARS = [x + 1 for x in range(y - 10, y)] def get_checkin_locations(user): diff --git a/servo/forms/notes.py b/servo/forms/notes.py index a5b0bb4..b6ce1af 100644 --- a/servo/forms/notes.py +++ b/servo/forms/notes.py @@ -2,7 +2,7 @@ import json from django import forms -from django.core.urlresolvers import reverse +from django.urls import reverse from django.utils.translation import ugettext_lazy as _ from servo.models import Note, Escalation, Template -- cgit v1.2.3