#NEWLINE# def _create_markup_model( fixed_language ) : #NEWLINE# #INDENT# '\n    Create a new MarkupItem model that saves itself in a single language.\n    ' #NEWLINE# title = ( backend . LANGUAGE_NAMES . get ( fixed_language ) or fixed_language ) #NEWLINE# objects = MarkupLanguageManager ( fixed_language ) #NEWLINE# def save( self , * args , **kwargs ) : #NEWLINE# #INDENT# self . language = fixed_language #NEWLINE# MarkupItem . save ( self , * args , ** kwargs ) #NEWLINE# #UNINDENT# class Meta ( ) : #NEWLINE# #INDENT# verbose_name = title #NEWLINE# verbose_name_plural = ( _ ( '%s items' ) % title ) #NEWLINE# proxy = True #NEWLINE# #UNINDENT# classname = '{0}MarkupItem' . format ( fixed_language . capitalize ( ) ) #NEWLINE# new_class = type ( classname , ( MarkupItem , ) , { #NEWLINE# #INDENT# '__module__' : MarkupItem . __module__ , #NEWLINE# 'objects' : objects , #NEWLINE# 'save' : save , #NEWLINE# 'Meta' : Meta , #NEWLINE# #UNINDENT# } ) #NEWLINE# LANGUAGE_MODEL_CLASSES [ fixed_language ] = new_class #NEWLINE# return new_class