def format_endpoint(self, resource_id):
"""
This method concatenates the resource's endpoint with a specified
identifier.
Example: endpoint/<pk>/
"""
if isinstance(resource_id, unicode):
resource_id = resource_id.encode("utf-8")
return urljoin(self.endpoint, quote(
str(resource_id))) + TRAILING_SLASH
评论列表
文章目录