comparison taginthemiddle/handlers.py @ 16:5f492a6fbdd1

add note about URL structure
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 24 May 2010 07:28:39 -0700
parents 86118cd8912e
children c85d42296c06
comparison
equal deleted inserted replaced
15:1701e5b0b0eb 16:5f492a6fbdd1
83 except HandlerMatchException: 83 except HandlerMatchException:
84 return None 84 return None
85 85
86 86
87 class ViewTags(GenshiHandler): 87 class ViewTags(GenshiHandler):
88 # TODO: RSS 88 """
89 View for tags on a resource; for app.tags_url == 'tags':
90
91 /<resource>/tags/mozilla :
92 all paths under /<resource> tagged with 'mozilla'
93
94 /<resource>/tags/mozilla+workflow :
95 all paths under /<resource> tagged with 'mozilla' and 'workflow'
96 (or should it be /<resource>/tags/mozilla/workflow , which would be
97 identical to /<resource>/tags/workflow/mozilla ?)
98
99 Also handles RSS:
100 /<resource>/tags/mozilla?format=rss
101 """
102
89 template = 'tags.html' 103 template = 'tags.html'
90 methods = set(['GET']) 104 methods = set(['GET'])
91 105
92 def __init__(self, app, request): 106 def __init__(self, app, request):
93 GenshiHandler.__init__(self, app, request) 107 GenshiHandler.__init__(self, app, request)
101 raise HandlerMatchException 115 raise HandlerMatchException
102 self.data['tags'] = self.tags 116 self.data['tags'] = self.tags
103 117
104 @classmethod 118 @classmethod
105 def match(cls, app, request): 119 def match(cls, app, request):
120
106 # check the method 121 # check the method
107 if request.method not in cls.methods: 122 if request.method not in cls.methods:
108 return None 123 return None
109 124
110 try: 125 try: