MCPcopy Index your code
hub / github.com/encode/django-rest-framework / _map

Method _map

rest_framework/decorators.py:256–265  ·  view source on GitHub ↗
(self, method, func)

Source from the content-addressed store, hash-verified

254 self[method] = self.action.__name__
255
256 def _map(self, method, func):
257 assert method not in self, (
258 "Method '%s' has already been mapped to '.%s'." % (method, self[method]))
259 assert func.__name__ != self.action.__name__, (
260 "Method mapping does not behave like the property decorator. You "
261 "cannot use the same method name for each mapping declaration.")
262
263 self[method] = func.__name__
264
265 return func
266
267 def get(self, func):
268 return self._map('get', func)

Callers 8

getMethod · 0.95
postMethod · 0.95
putMethod · 0.95
patchMethod · 0.95
deleteMethod · 0.95
headMethod · 0.95
optionsMethod · 0.95
traceMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected