      _options_class = HyperlinkedModelSerializerOptions
      _default_view_name = '%(model_name)s-detail'
      _hyperlink_field_class = HyperlinkedRelatedField
  
      url = HyperlinkedIdentityField()
  
      def __init__(self, *args, **kwargs):
          super(HyperlinkedModelSerializer, self).__init__(*args, **kwargs)
          lookup_field = self.opts.lookup_field
          self.fields['url'] = HyperlinkedIdentityField(lookup_field=lookup_field)
 
</s> remove         lookup_field = self.opts.lookup_field
        self.fields['url'] = HyperlinkedIdentityField(lookup_field=lookup_field)
 </s> add  </s> remove         # TODO: Make view_name mandatory, and have the
        # HyperlinkedModelSerializer set it on-the-fly
        self.view_name = kwargs.pop('view_name', None)
        # Optionally the format of the target hyperlink may be specified
 </s> add         try:
            self.view_name = kwargs.pop('view_name')
        except KeyError:
            msg = "HyperlinkedIdentityField requires 'view_name' argument"
            raise ValueError(msg)
 </s> remove         if lookup_field is not None:
            self.lookup_field = lookup_field
 </s> add         self.lookup_field = lookup_field or self.lookup_field </s> remove         view_name = self.view_name or self.parent.opts.view_name
 </s> add         view_name = self.view_name
    # Just a placeholder to ensure 'url' is the first field
    # The field itself is actually created on initialization,
    # when the view_name and lookup_field arguments are available.
    url = Field()
      _options_class = HyperlinkedModelSerializerOptions
      _default_view_name = '%(model_name)s-detail'
      _hyperlink_field_class = HyperlinkedRelatedField
  
    # Just a placeholder to ensure 'url' is the first field
    # The field itself is actually created on initialization,
    # when the view_name and lookup_field arguments are available.
    url = Field()
  
      def __init__(self, *args, **kwargs):
          super(HyperlinkedModelSerializer, self).__init__(*args, **kwargs)
          lookup_field = self.opts.lookup_field
          self.fields['url'] = HyperlinkedIdentityField(lookup_field=lookup_field)
keep keep keep keep replace keep keep keep keep keep
 view_name argument to HyperlinkedModelSerializer is now properly enforced.  Closes #471 
rest_framework/serializers.py