#NEWLINE# def clean_product( self ) : #NEWLINE# #INDENT# if ( self . cleaned_data . get ( 'link_type' ) == 'product' ) : #NEWLINE# #INDENT# app_label = ProductModel . _meta . app_label #NEWLINE# self . cleaned_data [ 'link_data' ] = { #NEWLINE# #INDENT# 'type' : 'product' , #NEWLINE# 'model' : '{0}.{1}' . format ( app_label , ProductModel . __name__ ) , #NEWLINE# 'pk' : self . cleaned_data [ 'product' ] , #NEWLINE# #UNINDENT# }