def atom(request): if request.method == 'POST': activeDocResults = Project.allActive() activeResults = [wrap(project) for project in activeDocResults] context = { 'active': reversed(activeResults), 'user': { 'roles': request.session.get('roles', []) }, 'debug': request.debug } return render_atom('projects/atom.xml', context)
def rss(request): if request.method == 'GET': active_doc_results = Project.allActive() active_results = [wrap(project) for project in active_doc_results] context = { 'active': reversed(active_results), 'user': { 'roles': request.session.get('roles', []) }, 'debug': request.debug } return render_xml('projects/rss2.xml', context)
def plist(request): active_results = [wrap(p) for p in Project.allActive()] if not request.is_xhr and request.method == 'GET': context = { 'active': reversed(active_results), 'user': { 'roles': request.session.get('roles', []) }, 'debug': request.debug } return render_html('/projects/list.html', context) elif request.is_xhr and request.method == 'GET': return Response(simplejson.dumps(active_results), mimetype='application/json')