Re: Javascript Templating Package

2016-10-11 Thread Nick Sarbicki
Hi Daniel, This is a separate idea. Instead of relying on JSON dumps, we actually generate an entire JS script via the engine. The flow is along the lines of: > Client makes request > Django receives request and renders an HTML page which it passes to the client. > The given HTML page has a sc

Re: Javascript Templating Package

2016-10-11 Thread Daniel Moisset
Hi Nick, I'm not sure what kind of generation are you suggesting. What I've used a couple of times is creating a template tag to convert a json-like data structure in the context to a javascript object, so in the template I have something like this in a

Javascript Templating Package

2016-10-11 Thread Nick Sarbicki
Hi Everyone, We were tasked at work some time ago with tidying up a legacy Django project. Part of the projects JS relied heavily on Django variables and settings and we were seeing frequent large variable JSON dumps in the templates. We cleaned this up and ended up designing a small package w