Skip to content
This repository has been archived by the owner on Nov 29, 2023. It is now read-only.

Commit

Permalink
Support Django 2 new import location.
Browse files Browse the repository at this point in the history
  • Loading branch information
sjdines committed Jan 18, 2018
1 parent 3ccdbfc commit f9543c7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion disposable_email_checker/validators.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,16 @@
from django.core import validators
from django.core.exceptions import ValidationError
from django.utils.translation import ugettext_lazy as _
from django.core.urlresolvers import get_callable

from bdea.client import BDEAClient

# Django moved the location of `get_callable` in Django 2.0. We have kept the original import for
# backwards compatibility.
try:
from django.core.urlresolvers import get_callable
except ImportError:
from django.urls import get_callable


class DisposableEmailChecker():
"""
Expand Down

0 comments on commit f9543c7

Please sign in to comment.