def items_ajax(request): """ This is the "hijaxed" request, to show a list of items """ items_template = Items() items_template.set_items([{ 'id': '1', 'item': 'Joe', }, { 'id': '2', 'item': 'Victoria', }]) return http.HttpResponse(items_template.render())
def items(request): """ This is the "default" request, to show a list of items """ outline_template = Outline() items_template = Items() items_template.set_items([{ 'id': '1', 'item': 'Joe', }, { 'id': '2', 'item': 'Victoria', }]) outline_template.set_body(items_template) return http.HttpResponse(outline_template.render())
def items_ajax(request): """ This is the "hijaxed" request, to show a list of items """ items_template = Items() items_template.set_items([{ 'id': '1', 'item': 'Joe', }, { 'id': '2', 'item': 'Victoria', } ]) return http.HttpResponse(items_template.render())
def items(request): """ This is the "default" request, to show a list of items """ outline_template = Outline() items_template = Items() items_template.set_items([{ 'id': '1', 'item': 'Joe', }, { 'id': '2', 'item': 'Victoria', } ]) outline_template.set_body(items_template) return http.HttpResponse(outline_template.render())