Nessuna descrizione
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

lodelsite.py 546B

1234567891011121314151617
  1. from lodel.utils.ini_files import ini_to_dict
  2. ## @brief Represents a Lodel Site
  3. # @note This class could inherit from Blueprint
  4. class LodelSite(object):
  5. def __init__(self, settings_file):
  6. self.settings_file = settings_file
  7. @property
  8. def settings(self):
  9. return ini_to_dict(self.settings_file)
  10. def config(self, state):
  11. lodelsite_settings = self.settings
  12. if lodelsite_settings:
  13. state.app.config['sites'][lodelsite_settings['Description']['shortname']] = lodelsite_settings