It's easy to set up with CherryPy
from fanstatic import Fanstatic
if __name__ == "__main__":
app = cherrypy.Application(Root())
app.wsgiapp.pipeline.append(('repoze.who', setup_auth))
app.wsgiapp.pipeline.append(('beaker', setup_session_storage))
app.wsgiapp.pipeline.append(('fanstatic', Fanstatic))
cherrypy.quickstart(app, config='workbench.conf')
after that is done, you can jquery.need() in the widget/template that needs jquery, and similar for our other dependencies. Has anyone else used fantastic? What are other solutions to dependencies and serving js/css? Is there an easier and better solution? Wrapping new libraries for fanstatic looks like a bit of effort but I haven't explored it much yet.
Loki
0 comments:
Post a Comment