def getDetail(request, type, slug, date=None):
  what = {'post': 'posts', 'page': 'pages'}
  xml_tree = ET.parse(util.checkBaseline())
  wp_tree = wp.loadXML()
  c = getDefaultContext(request)
  c['posts'] = getItems(xml_tree, what[type], isVisible)
  if not date or date.strftime('%Y-%m-%d') <= Config.WP_END_DATE:
    c['posts'] += wp.getItems(wp_tree, what[type])
  c['post'] = findContext(c['posts'], slug)
  if c['post']:
    c['post']['content'] = loadContent(c['post'])
    c['title'] += " - %s" % (c['post']['title'])
    assembleContext(c, xml_tree, wp_tree)
    t = util.getTemplate('detail.html')
    return HttpResponse(t.render(c))
  return get404(request, xml_tree, wp_tree)
Get the response for a page or post.
dataset/ETHPy150Open DeanCutlet/filestack/views.py/getDetail