toranb/ember-django-pagination — pull request #1 by lmeunier (2013-08-23 07:46:46+00:00)
Title: Fix pagination

The URL used for pagination is `/page/:page`, so the controller is `PersonPageController` and the template name is `person/page`.

The `model` function in `PersonPageRoute` must use `params.page` in `find()`. This parameter is sent to the backend, so the backend knows which page to return.

After an action that implies a change in models (`addPerson`, `updatePerson` or `deletePerson`), I force a refresh of the current page to reload data from the server. As adding or deleting a person may change objects present in the current page, we need to ask the server for a new set of objects.

I've directly attached the `username` input field to the controller, so we don't need a custom view (maybe not the best option... feedbacks are welcome).