              cls = obj.__class__
          else:
              cls = self.opts.model
  
          opts = cls._meta.concrete_model._meta
          pk_field = opts.pk
          while pk_field.rel:
              pk_field = pk_field.rel.to._meta.pk
          fields = [pk_field]
          fields += [field for field in opts.fields if field.serialize]
 
</s> remove deps = django>=1.4.1
 </s> add deps = django==1.4.1 </s> remove deps = django>=1.3.2
 </s> add deps = django==1.3.3 </s> remove deps = django>=1.4.1
 </s> add deps = django==1.4.1 </s> remove deps = django>=1.3.2
 </s> add deps = django==1.3.3
        opts = get_concrete_model(cls)._meta
              cls = obj.__class__
          else:
              cls = self.opts.model
  
        opts = get_concrete_model(cls)._meta
          pk_field = opts.pk
          while pk_field.rel:
              pk_field = pk_field.rel.to._meta.pk
          fields = [pk_field]
          fields += [field for field in opts.fields if field.serialize]
keep keep keep keep replace keep keep keep keep keep
 Fix serialization issue with Django 1.3 
rest_framework/serializers.py