का उपयोग कर जेनेरिक रिलेशन का क्रमबद्ध कैसे करें मैं मॉडल पर जेनेरिक रिलेशन का उपयोग कर रहा हूं और Django Rest Framework का उपयोग करके इसे क्रमबद्ध करने की कोशिश कर रहा हूं। हालांकि निम्नलिखित कर मुझे एक विशेषता त्रुटि देता है:Django Rest Framework
'GenericForeignKey' object has no attribute 'field'
models.py
class AdditionalInfo():
#other fields
seal_type = models.ForeignKey(ContentType,
related_name='seal'
)
seal_id = models.PositiveIntegerField(null=True)
seal = generic.GenericForeignKey(
'seal_type',
'seal_id')
serializers.py
class AdditionalInfoSerializer():
seal = serializers.Field(source='seal')
क्या मैं गलत कर रहा हूँ? मैं django आराम ढांचे दस्तावेज में इस बारे में ज्यादा नहीं पाया।