X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=myslice%2Fcomponents.py;h=ea4d88c5a8fbb02570ee5abf95b61549b69ce279;hb=0300e4a519eb44fa1e2b769f1c871471ebfe0620;hp=51cac47fa025b0e41af33c27f5fc066e88443b8f;hpb=9e11f56fd29e5edb663d4989dfd5351d71e3b809;p=myslice.git diff --git a/myslice/components.py b/myslice/components.py index 51cac47f..ea4d88c5 100644 --- a/myslice/components.py +++ b/myslice/components.py @@ -1,8 +1,7 @@ from django.conf.urls import include, url -from myslice.configengine import ConfigEngine +from myslice.settings import config, logger def list(): - config = ConfigEngine() if config.myslice.components : return config.myslice.components.split(',') else : @@ -15,9 +14,9 @@ def urls(): __import__(component) u.append( url(r'^%s/' % component, include('%s.urls' % component)) ) except Exception, e: - print "-> Cannot load component (%s): %s" % (component, e) + logger.error("Cannot load component ({}): {}".format(component, e)) else: - print "-> Loaded component %s" % component + logger.info("Loaded component {}".format(component)) return u