From 010ab0637d1d952ae3765a5b0ebdb00d02b3848a Mon Sep 17 00:00:00 2001 From: Umair Khan Date: Thu, 27 Oct 2016 17:52:33 +0500 Subject: [PATCH] Django 1.10: Upgrade integration urls. --- zerver/lib/integrations.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zerver/lib/integrations.py b/zerver/lib/integrations.py index 1b6821d4ff..28a8b253ee 100644 --- a/zerver/lib/integrations.py +++ b/zerver/lib/integrations.py @@ -2,6 +2,7 @@ from typing import Dict, List, Optional, TypeVar from django.conf import settings from django.conf.urls import url from django.core.urlresolvers import LocaleRegexProvider +from django.utils.module_loading import import_string """This module declares all of the (documented) integrations available in the Zulip server. The Integration class is used as part of @@ -60,6 +61,10 @@ class WebhookIntegration(Integration): if function is None: function = self.DEFAULT_FUNCTION_PATH.format(name=name) + + if isinstance(function, str): + function = import_string(function) + self.function = function if url is None: