Thanks Tom.

The most important things to clarify here are

1. How do I make a reference to a class (I had real trouble figuring out
what the view_name should be set to)
2. You refer to "customising" the view_name but you don't clarify how this
works anywhere that I could find in the documentation.

Anyway, I'm making fairly good progress towards getting an API set up for
gridspy.com but it's still hard to wrap my head around the design of such
an API - what do I need to publish, how do I strike the balance between big
responses vs lots of little requests etc.

Regards,

 <http://www.gridspy.co.nz/>
*Tom Leys *Director and Chief Executive Officer
*Web:* http://gridspy.com
*Ph: *+649 525 9715  *Mob: *+6421 165 4764


On Fri, Feb 21, 2014 at 1:13 AM, Tom Christie <notifications@github.com>wrote:

> In docs/api-guide/relations.md:
>
> > @@ -132,6 +132,17 @@ Would serialize to a representation like this:
> >
> >  By default this field is read-write, although you can change this behavior using the `read_only` flag.
> >
> > +**View Name**:
> > +
> > +The view name of your target must be specified using the `view_name` argument. The standard naming is `<model_name>-detail`.
> > +
> > +
> > +`<model_name>` : Corresponds to the name of the model, forced to lowercase. In this example `Track` becomes `track`
> > +
> > +`-detail` : Relates to either the detail view `-detail` or the list view `-list` of the related model.
> > +
> > +Note however: When you define a Serialiser, you can customise the `view_name` argument by specifing a custom one in the `Meta:` section of the serialiser definition.
> > +
>
> This looks like it ought to go in the Arguments view_name section just
> below here. Some of this is duplicated, but the model_name notes would be
> good to include. The serializer paragraph also doesn't quite make sense
> here - overriding view_name on a HyperlinkedModelSerializer sets the
> view_name that is used on the automatically generated
> HyperlinkedIdentityField field. (Not a HyperlinkedRelatedField since it
> links to the instance itself, rather than to a relationship on the instance)
>
> --
> Reply to this email directly or view it on GitHub<https://github.com/tomchristie/django-rest-framework/pull/1431/files#r9903991>
> .
>