Skip to content

Commit 68e8d29

Browse files
committed
backwards incompatible change
1 parent bee1cc0 commit 68e8d29

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

select_url_field/fields.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
from django.db import models
88
from django.utils.translation import ugettext_lazy as _
99
from django.utils.encoding import smart_unicode
10+
from select_url_field import select_url_field_settings
1011

1112
try:
1213
from importlib import import_module
@@ -48,8 +49,7 @@ def formfield(self, **kwargs):
4849
else:
4950
choices = self._url_choices
5051
else:
51-
from django.conf import settings
52-
mod_path, func_name = settings.URL_CHOICES_FUNC.rsplit('.', 1)
52+
mod_path, func_name = select_url_field_settings.URL_CHOICES_FUNC.rsplit('.', 1)
5353
mod = import_module(mod_path)
5454
choices_func = getattr(mod, func_name)
5555
choices = choices_func()
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
from django.conf import settings
2+
3+
URL_CHOICES_FUNC = getattr(settings, 'SELECT_URL_CHOICES_FUNC', 'choices_func.get_url_choices')

0 commit comments

Comments
 (0)