def plugins_list(): message = None plugins = Plugin.all() if not len(plugins): message = 'There are no plugins.' log("Plugins listed") return render_template('list.html', title='Plugin list', plugins=plugins, message=message)
def plugins_xml(): """Create the XML file""" version = None try: version = request.args.get('qgis') except KeyError: pass plugins = Plugin.all(version=version) response = make_response(render_template('plugins.xml', plugins=plugins)) response.headers['Content-Type'] = 'application/xml' response.headers['Content-Disposition'] = 'inline; plugins.xml' return response
def get(self): return {'plugins': {p.key: p.metadata for p in Plugin.all()}}