How to use the orchestra.contrib.orchestration.replace function in orchestra

To help you get started, we’ve selected a few orchestra examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github glic3rinu / django-orchestra / orchestra / contrib / saas / backends / drupalmu.py View on Github external
def get_context(self, webapp):
        context = super(DrupalMuController, self).get_context(webapp)
        context['drupal_path'] = settings.SAAS_DRUPAL_SITES_PATH % context
        context['drupal_settings'] = os.path.join(context['drupal_path'], 'settings.php')
        return replace(context, "'", '"')
github glic3rinu / django-orchestra / orchestra / contrib / saas / backends / bscw.py View on Github external
def get_context(self, saas):
        context = {
            'bsadmin': settings.SAAS_BSCW_BSADMIN_PATH,
            'email': saas.data.get('email'),
            'username': saas.name,
            'password': getattr(saas, 'password', None),
        }
        return replace(context, "'", '"')
github glic3rinu / django-orchestra / orchestra / contrib / databases / backends.py View on Github external
def get_context(self, db):
        context = {
            'db_name': db.name,
            'db_dirname': db.name.replace('-', '@003f'),
            'db_id': db.pk,
            'db_type': db.type,
        }
        return replace(replace(context, "'", '"'), ';', '')
github glic3rinu / django-orchestra / orchestra / contrib / systemusers / backends.py View on Github external
def get_context(self, user):
        context = {
            'object_id': user.pk,
            'base_home': user.get_base_home(),
        }
        return replace(context, "'", '"')
github glic3rinu / django-orchestra / orchestra / contrib / saas / backends / bscw.py View on Github external
def get_context(self, saas):
        context = {
            'bsadmin': settings.SAAS_BSCW_BSADMIN_PATH,
            'email': saas.data.get('email'),
            'username': saas.name,
            'password': getattr(saas, 'password', None),
        }
        return replace(context, "'", '"')
github glic3rinu / django-orchestra / orchestra / contrib / webapps / backends / wordpress.py View on Github external
def get_context(self, webapp):
        context = super(WordPressController, self).get_context(webapp)
        context.update({
            'db_name': webapp.data['db_name'],
            'db_user': webapp.data['db_user'],
            'password': webapp.data['password'],
            'db_host': settings.WEBAPPS_DEFAULT_MYSQL_DATABASE_HOST,
            'email': webapp.account.email,
            'title': "%s blog's" % webapp.account.get_full_name(),
            'cms_cache_dir': os.path.normpath(settings.WEBAPPS_CMS_CACHE_DIR)
        })
        return replace(context, '"', "'")
github glic3rinu / django-orchestra / orchestra / contrib / lists / backends.py View on Github external
def get_context(self, mail_list):
        context = self.get_context_files()
        context.update({
            'banner': self.get_banner(mail_list),
            'name': mail_list.name,
            'password': mail_list.password,
            'domain': mail_list.address_domain or settings.LISTS_DEFAULT_DOMAIN,
            'address_name': mail_list.get_address_name(),
            'address_domain': mail_list.address_domain,
            'suffixes_regex': '\|'.join(self.address_suffixes),
            'admin': mail_list.admin_email,
            'mailman_root': settings.LISTS_MAILMAN_ROOT_DIR,
        })
        return replace(context, "'", '"')
github glic3rinu / django-orchestra / orchestra / contrib / databases / backends.py View on Github external
def get_context(self, database):
        context = {
            'database': database.name,
            'host': settings.DATABASES_DEFAULT_HOST,
        }
        return replace(replace(context, "'", '"'), ';', '')