comparison src/server/blog.py @ 786:f0ad3f62bae2

server_side (blog): pubsub item ID doesn't need to be an UUID
author souliane <souliane@mailoo.org>
date Tue, 01 Dec 2015 23:57:28 +0100
parents 78caef6ed8e7
children f8a7a046ff9c
comparison
equal deleted inserted replaced
785:103f0f01ba54 786:f0ad3f62bae2
167 167
168 if len(request.postpath) > 1: 168 if len(request.postpath) > 1:
169 if request.postpath[1] == 'atom.xml': # return the atom feed 169 if request.postpath[1] == 'atom.xml': # return the atom feed
170 request.atom = True 170 request.atom = True
171 else: 171 else:
172 try: # check if the given path is a valid UUID 172 request.item_id = request.postpath[1]
173 uuid.UUID(request.postpath[1])
174 request.item_id = request.postpath[1]
175 except ValueError:
176 pass
177 173
178 self.parseURLParamsRSM(request) 174 self.parseURLParamsRSM(request)
179 request.display_single = (request.item_id is not None) or int(request.extra_dict['rsm_max']) == 1 175 request.display_single = (request.item_id is not None) or int(request.extra_dict['rsm_max']) == 1
180 self.parseURLParamsCommentsRSM(request) 176 self.parseURLParamsCommentsRSM(request)
181 177