rest: edit views don't render correctly on server

When accessing an edit view (e.g. `[model_name]s/[item]/edit` or `[model_name]s/new`) directly via the URL, the generated context does not match the equivalent context that would be generated by the client side router in `app.js` .  In most cases this is fine, since these URLs are usually accessed by navigating within the client.  However, debugging edit templates is cumbersome due to the need to recompile and change urls back and forth.

The `[model_name]s/new` view does not work at all, getting a lookup error instead.