mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-02 11:30:12 +03:00
Rename APIView.initial() to APIView.initialize()
This commit is contained in:
parent
0fa9866848
commit
9805351b58
|
@ -224,7 +224,7 @@ class APIView(View):
|
|||
negotiator=self.get_content_negotiator(),
|
||||
parser_context=parser_context)
|
||||
|
||||
def initial(self, request, *args, **kwargs):
|
||||
def initialize(self, request, *args, **kwargs):
|
||||
"""
|
||||
Runs anything that needs to occur prior to calling the method handler.
|
||||
"""
|
||||
|
@ -312,7 +312,7 @@ class APIView(View):
|
|||
self.headers = self.default_response_headers # deprecate?
|
||||
|
||||
try:
|
||||
self.initial(request, *args, **kwargs)
|
||||
self.initialize(request, *args, **kwargs)
|
||||
|
||||
# Get the appropriate handler method
|
||||
if request.method.lower() in self.http_method_names:
|
||||
|
|
Loading…
Reference in New Issue
Block a user