有没有办法可以快速公开腌制数据对象?我需要 /api/food/ID_NUM/shops 之类的东西
其中“商店”是自定义类的一部分
from SerializedDataField import SerializedDataField #custom class obj
class Food(models.Model):
title = models.TextField()
description = models.TextField()
creator = models.ForeignKey(User)
created = models.DateTimeField(default = datetime.datetime.now())
"""Pickled fresh food object."""
foodObj = SerializedDataField()
非常感谢