def create_import_marking(self, args, options):
marking_json = None<EOL>placeholder_dict = {}<EOL>if options.get('<STR_LIT>'):<EOL><INDENT>with open(options['<STR_LIT>'], '<STR_LIT:r>') as content_file:<EOL><INDENT>marking_json = content_file.read()<EOL><DEDENT>del(options['<STR_LIT>'])<EOL>placeholders = self.RE_SEARCH_PLACEHOLDERS.findall(marking_json)<EOL>if placeholders:<EOL><INDENT>for placeholder in placeholders:<EOL><INDENT>placeholder_dict[placeholder] = '<STR_LIT>'<EOL><DEDENT><DEDENT><DEDENT>if options.get('<STR_LIT>'):<EOL><INDENT>for (placeholder, value) in options['<STR_LIT>']:<EOL><INDENT>placeholder_dict[placeholder] = value<EOL><DEDENT>del(options['<STR_LIT>'])<EOL><DEDENT>placeholder_dict['<STR_LIT>'] = getpass.getuser()<EOL>placeholder_dict['<STR_LIT>'] = os.path.basename(__file__)<EOL>placeholder_dict['<STR_LIT>'] = "<STR_LIT:%s>" % options<EOL>placeholder_dict['<STR_LIT>'] = args<EOL>if marking_json:<EOL><INDENT>marking_json = marking_json.replace('<STR_LIT:%>','<STR_LIT>')<EOL>marking_json = self.RE_SEARCH_PLACEHOLDERS.sub("<STR_LIT>", marking_json)<EOL>marking_json = marking_json % placeholder_dict<EOL>marking_dict = dict2DingoObjDict(json.loads(marking_json))<EOL>marking = DingoImporter.create_marking_iobject(metadata_dict=marking_dict)<EOL>return marking<EOL><DEDENT>return None<EOL>
This function parses the `--marking_json` and `--marking_pfill` arguments
and creates a marking object if these parameters are specified.

Look into 'dingos/management/commands/dingos_generic_xml_import.py to see how
this is used to specify a Django command line argument 'dingos_generic_xml_import'
that can be called with Django's 'manage.py'