#NEWLINE# def clean_content( self ) : #NEWLINE# #INDENT# field = self . cleaned_data . get ( 'content' ) #NEWLINE# reader = get_reader ( markup = self . data . get ( 'markup' ) ) #NEWLINE# ( self . content_body , self . metadata ) = reader ( field ) . read ( ) #NEWLINE# slug = self . metadata . get ( 'slug' ) #NEWLINE# if ( ( self . metadata . get ( 'title' ) is None ) or ( slug is None ) ) : #NEWLINE# #INDENT# msg = _ ( 'Title or slug can not be empty.' ) #NEWLINE# raise forms . ValidationError ( msg ) #NEWLINE# #UNINDENT# if ( ( self . instance . pk is None ) and Article . objects . filter ( slug = slug ) . exists ( ) ) : #NEWLINE# #INDENT# msg = _ ( 'Slug should be unique.' ) #NEWLINE# raise forms . ValidationError ( msg ) #NEWLINE# #UNINDENT# return field