From 0a12ffdb6711286d3189f7bf65b84913db9498a1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Sat, 18 Apr 2015 14:27:02 +0200 Subject: [PATCH] lingo: declare new URLs and actions via django.apps (#6979) --- combo/apps/lingo/__init__.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/combo/apps/lingo/__init__.py b/combo/apps/lingo/__init__.py index 3f59d278..7bc8fad6 100644 --- a/combo/apps/lingo/__init__.py +++ b/combo/apps/lingo/__init__.py @@ -14,6 +14,7 @@ # You should have received a copy of the GNU Affero General Public License # along with this program. If not, see . +import django.apps from django.core.urlresolvers import reverse from django.utils.translation import ugettext as _ @@ -21,6 +22,10 @@ class Plugin(object): def get_apps(self): return [__name__] + +class AppConfig(django.apps.AppConfig): + name = 'lingo' + def get_before_urls(self): from . import urls return urls.urlpatterns @@ -28,3 +33,5 @@ class Plugin(object): def get_extra_manager_actions(self): return [{'href': reverse('lingo-manager-homepage'), 'text': _('Online Payment')}] + +default_app_config = 'lingo.AppConfig'