rewrite of django view to dynamically add/remove contenet