Logo Search packages:      
Sourcecode: zine version File versions  Download package

def zine::application::Zine::add_shared_exports (   self,
  name,
  path 
)

Add a shared export for name that points to a given path and
creates an url rule for <name>/shared that takes a filename
parameter.  A shared export is some sort of static data from a
plugin.  Per default Zine will shared the data on it's own but
in the future it would be possible to generate an Apache/nginx
config on the fly for the static data.

The static data is available at `/_shared/<name>` and points to
`path` on the file system.  This also generates a URL rule named
`<name>/shared` that accepts a `filename` parameter.  This can be
used for URL generation.

Definition at line 907 of file application.py.

00907                                             :
        """Add a shared export for name that points to a given path and
        creates an url rule for <name>/shared that takes a filename
        parameter.  A shared export is some sort of static data from a
        plugin.  Per default Zine will shared the data on it's own but
        in the future it would be possible to generate an Apache/nginx
        config on the fly for the static data.

        The static data is available at `/_shared/<name>` and points to
        `path` on the file system.  This also generates a URL rule named
        `<name>/shared` that accepts a `filename` parameter.  This can be
        used for URL generation.
        """
        self._shared_exports['/_shared/' + name] = path
        self.add_url_rule('/_shared/%s/<string:filename>' % name,
                          endpoint=name + '/shared', build_only=True)

    @setuponly
    def add_middleware(self, middleware_factory, *args, **kwargs):


Generated by  Doxygen 1.6.0   Back to index