Serializing Foreign Key objects in Django

后端 未结 5 886
渐次进展
渐次进展 2020-11-27 16:14

I have been working on developing some RESTful Services in Django to be used with both Flash and Android apps.

Developing the services interface has been quite simp

5条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-11-27 16:47

    UPDATE: Actually Manoj's solution is a bit outdated, Wad of Stuff's serializer has been left un-updated for some time and when I tried that, it seems that it does not support Django 1.6 anymore.

    However, take a look at Django's official doc here. It does provide some way around using the built-in natural key. It seems that django's built-in serializer has a a little problem supporting using ImageField as part of the natural key. But that can be easily fixed by your self.

提交回复
热议问题