Skip to content
Browse files

Add a dispatch method to View base class, as suggested by Russel and …

  • Loading branch information...
1 parent 25e7ac4 commit 20b63340bbf2b6152f88b5ee47865689d9fae3a6 @davidbgk davidbgk committed
Showing with 3 additions and 0 deletions.
  1. +3 −0 class_based_views/
3 class_based_views/
@@ -52,6 +52,9 @@ def __call__(self, request, *args, **kwargs):
self.request = request
self.args = args
self.kwargs = kwargs
+ return self.dispatch(request, *args, **kwargs)
+ def dispatch(self, request, *args, **kwargs):
# Try to dispatch to the right method for that; if it doesn't exist,
# raise a big error.
if hasattr(self, request.method.upper()):

0 comments on commit 20b6334

Please sign in to comment.
Something went wrong with that request. Please try again.