Rename APIView.initial() to APIView.initialize()

This commit is contained in:
Adam Avramov 2013-08-05 12:36:57 +03:00
parent 0fa9866848
commit 9805351b58

View File

@ -224,7 +224,7 @@ class APIView(View):
negotiator=self.get_content_negotiator(), negotiator=self.get_content_negotiator(),
parser_context=parser_context) 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. 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? self.headers = self.default_response_headers # deprecate?
try: try:
self.initial(request, *args, **kwargs) self.initialize(request, *args, **kwargs)
# Get the appropriate handler method # Get the appropriate handler method
if request.method.lower() in self.http_method_names: if request.method.lower() in self.http_method_names: