Есть нечто подобное
content_type = models.ForeignKey(ContentType, on_delete=models.CASCADE)
object_id = models.PositiveIntegerField()
content_object = GenericForeignKey('content_type', 'object_id')
В других моделях
field = GenericRelation(
Fieldmodel,
related_query_name='typeone',
content_type_field=`custom_content_type_for_this_model',
object_id_field='object_id',
)
Как в темплейте сравнить content_type если в модельях из 2го примера кода он разньій ? Делал как сравнение со строкой но не сработало.
Хочу сравнивать по custom_content_type_for_this_model
Спасибо.