Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion rest_framework_docs/api_endpoint.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import json
import inspect
from django.contrib.admindocs.views import simplify_regex
from django.utils.encoding import force_str


class ApiEndpoint(object):
Expand All @@ -25,7 +26,7 @@ def __get_path__(self, parent_pattern):
return simplify_regex(self.pattern.regex.pattern)

def __get_allowed_methods__(self):
return [m.upper() for m in self.callback.cls.http_method_names if hasattr(self.callback.cls, m)]
return [force_str(m).upper() for m in self.callback.cls.http_method_names if hasattr(self.callback.cls, m)]

def __get_docstring__(self):
return inspect.getdoc(self.callback)
Expand Down