#NEWLINE# def dispatch( self , request , * args , **kwargs ) : #NEWLINE# #INDENT# content_type = get_object_or_404 ( ContentType , app_label = self . kwargs [ 'app_label' ] , model = self . kwargs [ 'model' ] ) #NEWLINE# try : #NEWLINE# #INDENT# self . content_object = content_type . get_object_for_this_type ( pk = self . kwargs [ 'object_id' ] ) #NEWLINE# #UNINDENT# except content_type . model_class ( ) . DoesNotExist : #NEWLINE# #INDENT# raise Http404 #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# Permission . check_permissions ( request . user , ( permission_transformation_create , ) ) #NEWLINE# #UNINDENT# except PermissionDenied : #NEWLINE# #INDENT# AccessControlList . objects . check_access ( permission_transformation_create , self . user , self . content_object ) #NEWLINE# #UNINDENT# return super ( TransformationCreateView , self ) . dispatch ( request , * args , ** kwargs )