equal
deleted
inserted
replaced
223 |
223 |
224 def possible_configurations(directory): |
224 def possible_configurations(directory): |
225 """return a list of installed configurations in a directory |
225 """return a list of installed configurations in a directory |
226 according to \*-ctl files |
226 according to \*-ctl files |
227 """ |
227 """ |
228 return [name for name in ('repository', 'all-in-one') |
228 return [name for name in ('repository', 'all-in-one', 'pyramid') |
229 if exists(join(directory, '%s.conf' % name))] |
229 if exists(join(directory, '%s.conf' % name))] |
230 |
230 |
231 |
231 |
232 def guess_configuration(directory): |
232 def guess_configuration(directory): |
233 """try to guess the configuration to use for a directory. If multiple |
233 """try to guess the configuration to use for a directory. If multiple |
708 cubes.__path__ = cls.cubes_search_path() |
708 cubes.__path__ = cls.cubes_search_path() |
709 |
709 |
710 @classmethod |
710 @classmethod |
711 def load_available_configs(cls): |
711 def load_available_configs(cls): |
712 for confmod in ('web.webconfig', 'etwist.twconfig', |
712 for confmod in ('web.webconfig', 'etwist.twconfig', |
713 'server.serverconfig',): |
713 'server.serverconfig', 'pyramid.config'): |
714 try: |
714 try: |
715 __import__('cubicweb.%s' % confmod) |
715 __import__('cubicweb.%s' % confmod) |
716 except ImportError as exc: |
716 except ImportError as exc: |
717 cls.warning('failed to load config module %s (%s)', |
717 cls.warning('failed to load config module %s (%s)', |
718 confmod, exc) |
718 confmod, exc) |