random_instances是一種實用工具檢索或產生的Django模型的隨機實例。該模塊導出get_or_create_random功能,提高了Django的get_or_create(http://djangoproject.com/documentation/models/get_or_create/)在兩個方面:*調用get_or_create_random相匹配的多個實例,不引發錯誤的參數,而是返回這些實例之一隨機*調用get_or_create_random與參數不匹配任何實例返回該模型的新實...