I can't seem to determine what a model's field type is from within a template. I'm iterating through all rows and fields and want to implement special handling for certain field types, but it doesn't work. Here's how my object looks in models.py:


Code Python:
class MyModel(models.Model)
    Field1 = models.CharField(max_length=30)
    Field2 = models.DateTimeField()
And this is what is in views.py:
Code Python:
def MyView(request):
    entries = serializers.serialize( "python", MyModel.objects.all()[:10] )
    return render_to_response('MyTemplate.html', entries, context_instance=RequestContext(request))
And finally, my template file:
Code Python:
<table>        
    {% for entry in entries %}
            <tr>        
            {% for field, value in entry.fields.items %}
                    <td>
                    {% if field|field_type = "DateTimeField" %}    
                                        hooray!, this is a DateTimeField
                    {% else %}   
                                        boo! no this is not a DateTimeField!
                    {% endif %}
                    </td>
            {% endfor %}
            </tr>
    {% endfor %}    
</table>
You'd think that I'd end up with one "hooray" and one "boo", but I'm getting all "boo"'s
I've tried "field.type" and a number of other ways but nothing seems to return what I'm looking for. Can anyone offer help on this?