Put the appending code in the controller. On Wednesday, August 13, 2014 7:14:46 AM UTC-4, pa...@cancamusa.net wrote: > > > Dear all: > In the process of moving functionality from models to modules, I'm trying > to add some filesto the header. When the file was in models, I did: > > response.files.append(URL('static', 'jqplot/jquery.jqplot.min.js')) > response.files.append(URL('static', > 'jqplot/jquery.jqplot.min.css')) > > now that it's in modules, I tried: > > current.response.files.append(URL('static', > 'jqplot/jquery.jqplot.min.js')) > current.response.files.append(URL('static', > 'jqplot/jquery.jqplot.min.css')) > > but it doesn't work... > I've found a workaround, the last line in JQPlot.xml was: > > return current.response.render('jqplot.html', d) > > so I can add "script" html tags to the template jqplot.html: > > <script src="/karakolas/static/jqplot/jquery.jqplot.min.js"></script> > <script src="/karakolas/static/jqplot/jquery.jqplot.min.css"></script> > > but I'm sure it can be done better... > Thanks
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.