Skip to main content


Showing posts from April, 2013

AngularJS and Django

Two excellent tools for creating websites are Django and AngularJS, unfortunately they both use the same {{ syntax}} for templates which makes it a bit messy to include both in the same file. This isn't necessarily a bad thing as mixing server and client rendering just sounds like a recipe for a vulnerability.

The method that has been working for me is to completely separate any client side templates from server side templates. For example I serve from a static apache instance a file like this:

<sectionid="search"ng-controller="MyCtrl"><inputtype="search" ng-model="searchTerm" ng-change="doSearch()"results="10" placeholder="Search for track to add"autofocus autocomplete="off"><tableclass="table"ng-show="result.tracks"><thead><tr><th>Track</th><th>Artist</th></tr></th…