Ejemplo n.º 1
0
 def __init__(self, *args, **kwargs):
     # Set the template loader to a postgres-version-aware loader
     self.jinja_options = ImmutableDict(
         extensions=['jinja2.ext.autoescape', 'jinja2.ext.with_'],
         loader=VersionedTemplateLoader(self)
     )
     super(PgAdmin, self).__init__(*args, **kwargs)
Ejemplo n.º 2
0
    def __init__(self, *args, **kwargs):
        # Set the template loader to a postgres-version-aware loader
        self.jinja_options = ImmutableDict(
            autoescape=select_autoescape(enabled_extensions=('html', 'xml')),
            loader=VersionedTemplateLoader(self))
        self.logout_hooks = []

        super(PgAdmin, self).__init__(*args, **kwargs)
Ejemplo n.º 3
0
 def __init__(self, *args, **kwargs):
     # Set the template loader to a postgres-version-aware loader
     self.jinja_options = ImmutableDict(
         extensions=['jinja2.ext.autoescape', 'jinja2.ext.with_'],
         loader=VersionedTemplateLoader(self)
     )
     super(PgAdmin, self).__init__(*args, **kwargs)
     import mimetypes
     mimetypes.add_type('image/svg+xml', '.svg')