Example #1
0
def renderListAll():

    webEntries = manage_webentries.getWebEntries()
    html = webdoc_render.renderListEntries_CleanAndSimple(webEntries, title='')

    t = Template(readResource('list_all.html'))

    html = t.render(Context({'list_all': html}))

    return html
Example #2
0
def renderListAll():

    webEntries = manage_webentries.getWebEntries()
    html = webdoc_render.renderListEntries_CleanAndSimple(webEntries, title = '')

    t = Template(readResource('list_all.html'))

    html = t.render(Context({'list_all': html}))

    return html
Example #3
0
def renderMainPage():

    # Only display "important" entries.
    webEntries = manage_webentries.getWebEntriesMatchingTag('viewA')

    html_webEntriesList = webdoc_render.renderListEntries_CleanAndSimple(webEntries, title = '')

    t = Template(readResource('tags_cloud.html'))
    dictTagImp = manage_webentries.getDictTagImportance()
    tag_cloud_html = t.render(Context({'dict_tags_importance': dictTagImp}))

    t = Template(readResource('main_page.html'))

    html = t.render(Context({'main_list': html_webEntriesList, 'tags_cloud': tag_cloud_html}))

    return html
Example #4
0
def tags(request, param = ''):

  requested_tag = param

  lstWebdocEntries = manage_webentries.getWebEntries()

  lstWebdocEntriesWithRightTag = []
  for webdocEntry in lstWebdocEntries:
    if requested_tag in webdocEntry.getTags():
        lstWebdocEntriesWithRightTag.append(webdocEntry)

  if len(lstWebdocEntriesWithRightTag) > 0:
    html = webdoc_render.renderListEntries_CleanAndSimple(lstWebdocEntriesWithRightTag, title = 'List of Content with Tag: %s' % requested_tag)
  else:
    html = '<h3>no article with tag: %s</h3>' % requested_tag

  return HttpResponse(html)
Example #5
0
def tags(request, param=''):

    requested_tag = param

    lstWebdocEntries = manage_webentries.getWebEntries()

    lstWebdocEntriesWithRightTag = []
    for webdocEntry in lstWebdocEntries:
        if requested_tag in webdocEntry.getTags():
            lstWebdocEntriesWithRightTag.append(webdocEntry)

    if len(lstWebdocEntriesWithRightTag) > 0:
        html = webdoc_render.renderListEntries_CleanAndSimple(
            lstWebdocEntriesWithRightTag,
            title='List of Content with Tag: %s' % requested_tag)
    else:
        html = '<h3>no article with tag: %s</h3>' % requested_tag

    return HttpResponse(html)
Example #6
0
def renderMainPage():

    # Only display "important" entries.
    webEntries = manage_webentries.getWebEntriesMatchingTag('viewA')

    html_webEntriesList = webdoc_render.renderListEntries_CleanAndSimple(
        webEntries, title='')

    t = Template(readResource('tags_cloud.html'))
    dictTagImp = manage_webentries.getDictTagImportance()
    tag_cloud_html = t.render(Context({'dict_tags_importance': dictTagImp}))

    t = Template(readResource('main_page.html'))

    html = t.render(
        Context({
            'main_list': html_webEntriesList,
            'tags_cloud': tag_cloud_html
        }))

    return html