Allow app to auto add their urlpatterns via MayanAppConfig AppConfig subclass
This commit is contained in:
@@ -1,16 +1,19 @@
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django import apps
|
||||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
from common import menu_setup
|
||||
from common import MayanAppConfig, menu_setup
|
||||
|
||||
from .links import link_check_settings
|
||||
|
||||
|
||||
class SmartSettingsApp(apps.AppConfig):
|
||||
class SmartSettingsApp(MayanAppConfig):
|
||||
app_namespace = 'settings'
|
||||
app_url = 'settings'
|
||||
name = 'smart_settings'
|
||||
verbose_name = _('Smart settings')
|
||||
|
||||
def ready(self):
|
||||
super(SmartSettingsApp, self).ready()
|
||||
|
||||
menu_setup.bind_links(links=[link_check_settings])
|
||||
|
||||
Reference in New Issue
Block a user