Mercurial > hg > ChinaGisRestApi
comparison RESTinterface.py @ 1:48de7c260ffe
first commit
author | fknauft |
---|---|
date | Wed, 12 May 2010 14:34:42 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
0:7015452299aa | 1:48de7c260ffe |
---|---|
1 ''' | |
2 Created on 26.04.2010 | |
3 | |
4 @author: fknauft | |
5 ''' | |
6 | |
7 from zope.publisher.interfaces import IPublishTraverse | |
8 from zope.interface import implements | |
9 #from zope.publisher.interfaces import NotFound | |
10 #from zope.app import zapi | |
11 #from zope.component import queryMultiAdapter | |
12 try: | |
13 from ZPublisher.BaseRequest import DefaultPublishTraverse | |
14 except: | |
15 pass | |
16 class RESTinterface(DefaultPublishTraverse): | |
17 """VLP spezifische Erweiterung der Collection""" | |
18 | |
19 implements(IPublishTraverse) | |
20 | |
21 def publishTraverse(self,request,name): | |
22 """change the traversal if literature object""" | |
23 | |
24 actual_url=request['ACTUAL_URL'] | |
25 lastActual=actual_url.split("/")[-1] | |
26 | |
27 | |
28 tr=DefaultPublishTraverse(self, request) | |
29 ob= tr.publishTraverse(request, name) | |
30 | |
31 return ob | |
32 #raise NotFound(self.context, name, request) | |
33 #return repr(request) |