예제 #1
0
파일: base.py 프로젝트: sassoftware/mint
 def url(self, request, *args, **kw):
     result = RestController.url(self, request, *args, **kw)
     if not request.extension:
         return result
     if result[-1] == '/':
         return result[:-1] + request.extension  + '/'
     return result + request.extension
예제 #2
0
파일: site.py 프로젝트: pombredanne/mint
    def url(self, request, *args, **kw):
        result = None
        try:
            result = RestController.url(self, request, *args, **kw)
        except exceptions.KeyError:
            # workaround to be able to return URLs linking to Django
            # which are hard coded string return values from the
            # get_absolute_url function
            return "".join(args)

        if not request.extension:
            return result
        if result[-1] == "/":
            return result[:-1] + request.extension + "/"
        return result + request.extension