我们从Python开源项目中,提取了以下17个代码示例,用于说明如何使用django.utils.datastructures.ImmutableList()。
def parse_file_upload(self, META, post_data): """Returns a tuple of (POST QueryDict, FILES MultiValueDict).""" self.upload_handlers = ImmutableList( self.upload_handlers, warning="You cannot alter upload handlers after the upload has been processed." ) parser = MultiPartParser(META, post_data, self.upload_handlers, self.encoding) return parser.parse()
def make_immutable_fields_list(name, data): return ImmutableList(data, warning=IMMUTABLE_WARNING % name)