From: Stefan Kögl Date: Sat, 27 Apr 2013 14:05:12 +0000 (+0200) Subject: avoid naming conflict with settings api X-Git-Url: https://repo.or.cz/w/mygpo.git/commitdiff_plain/45054e90290fb6405bbcd0782ef4dca1e1c21313 avoid naming conflict with settings api --- diff --git a/mygpo/api/advanced/__init__.py b/mygpo/api/advanced/__init__.py index 4e406a24..af528f51 100644 --- a/mygpo/api/advanced/__init__.py +++ b/mygpo/api/advanced/__init__.py @@ -34,7 +34,7 @@ from django.views.decorators.csrf import csrf_exempt from django.views.decorators.cache import never_cache from django.utils.decorators import method_decorator from django.views.generic.base import View -from django.conf import settings +from django.conf import settings as dsettings from mygpo.api.constants import EPISODE_ACTION_TYPES, DEVICE_TYPES from mygpo.api.httpresponse import JsonResponse @@ -192,8 +192,8 @@ def episodes(request, username, version=1): log('start: user %s: %d actions from %s' % (request.user._id, len(actions), ua_string)) # handle in background - if len(actions) > settings.API_ACTIONS_MAX_NONBG: - bg_handler = settings.API_ACTIONS_BG_HANDLER + if len(actions) > dsettings.API_ACTIONS_MAX_NONBG: + bg_handler = dsettings.API_ACTIONS_BG_HANDLER if bg_handler is not None: modname, funname = bg_handler.rsplit('.', 1)