Object factory for django