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
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