#NEWLINE# def create( self , request ) : #NEWLINE# #INDENT# '\n        Creates a new blogpost.\n        ' #NEWLINE# attrs = self . flatten_dict ( request . POST ) #NEWLINE# if self . exists ( ** attrs ) : #NEWLINE# #INDENT# return rc . DUPLICATE_ENTRY #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# post = Blogpost ( title = attrs [ 'title' ] , content = self [ 'content' ] , author = request . user ) #NEWLINE# post . save ( ) #NEWLINE# return post