Replace deprecated functions
This commit is contained in:
+1
-1
@@ -1,7 +1,7 @@
|
||||
"""File containing Ohlhafv forms."""
|
||||
|
||||
from django import forms
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.core.exceptions import ValidationError
|
||||
|
||||
from ohlhafv.models import OhlhafvChallenge
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ from django.utils import timezone
|
||||
from datetime import timedelta
|
||||
from django.contrib.auth.models import User
|
||||
from webapp.utils import month_from_now
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.contrib.auth.models import User
|
||||
from auditlog.registry import auditlog
|
||||
from phonenumber_field.modelfields import PhoneNumberField
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
import django_tables2 as tables
|
||||
from django.db.models import Count, Q
|
||||
from django.utils.translation import ugettext as _
|
||||
from django.utils.translation import gettext as _
|
||||
|
||||
from ohlhafv.models import OhlhafvChallenge
|
||||
|
||||
|
||||
+5
-5
@@ -1,16 +1,16 @@
|
||||
"""Ohlhafv urls."""
|
||||
|
||||
from django.conf.urls import url
|
||||
from django.urls import re_path
|
||||
from django.conf import settings
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
|
||||
from ohlhafv.views import *
|
||||
|
||||
urlpatterns = [
|
||||
# ohlhafv
|
||||
url(r"^submit", ohlhafv_submit),
|
||||
url(r"^list", ohlhafv_list),
|
||||
url(r"^$", ohlhafv_view),
|
||||
re_path(r"^submit", ohlhafv_submit),
|
||||
re_path(r"^list", ohlhafv_list),
|
||||
re_path(r"^$", ohlhafv_view),
|
||||
]
|
||||
|
||||
if settings.DEBUG:
|
||||
|
||||
+1
-1
@@ -3,7 +3,7 @@ from django.shortcuts import render
|
||||
from django.views.decorators.http import require_http_methods
|
||||
from django.views.decorators.csrf import ensure_csrf_cookie
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
from django.utils.translation import gettext_lazy as _
|
||||
from django.template.loader import render_to_string
|
||||
|
||||
from sikweb.settings import URL
|
||||
|
||||
Reference in New Issue
Block a user