~ubuntu-branches/ubuntu/natty/moin/natty-updates

« back to all changes in this revision

Viewing changes to MoinMoin/action/showtags.py

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-22 21:17:13 UTC
  • mfrom: (0.9.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20080622211713-fpo2zrq3s5dfecxg
Tags: 1.7.0-3
Simplify /etc/moin/wikilist format: "USER URL" (drop unneeded middle
CONFIG_DIR that was wrongly advertised as DATA_DIR).  Make
moin-mass-migrate handle both formats and warn about deprecation of
the old one.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- coding: iso-8859-1 -*-
 
2
"""
 
3
    MoinMoin - "showtags" action
 
4
 
 
5
    This action shows all sync tags related to a specific page.
 
6
 
 
7
    @copyright: 2006 MoinMoin:AlexanderSchremmer
 
8
    @license: GNU GPL, see COPYING for details.
 
9
"""
 
10
 
 
11
from MoinMoin import config
 
12
from MoinMoin.Page import Page
 
13
from MoinMoin.wikisync import TagStore
 
14
 
 
15
def execute(pagename, request):
 
16
    mimetype = "text/plain"
 
17
 
 
18
    request.emit_http_headers(["Content-Type: %s; charset=%s" % (mimetype, config.charset)])
 
19
 
 
20
    page = Page(request, pagename)
 
21
    tags = TagStore(page)
 
22
    request.write(tags.dump())
 
23