#NEWLINE# def clean_slug( self ) : #NEWLINE# #INDENT# slug = slugify ( self . cleaned_data [ 'slug' ] ) #NEWLINE# slug_validator ( slug ) #NEWLINE# if ( self . instance and ( self . instance . slug == slug ) ) : #NEWLINE# #INDENT# return slug #NEWLINE# #UNINDENT# author = slug . initial [ 'author' ] #NEWLINE# if author . collections . filter ( slug = slug ) . count ( ) : #NEWLINE# #INDENT# raise forms . ValidationError ( _ ( 'This url is already in use by another collection' ) ) #NEWLINE# #UNINDENT# return slug