Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

3.0 framework cannot support pagination on browsable view #2073

Closed
bwlee opened this issue Nov 15, 2014 · 2 comments
Closed

3.0 framework cannot support pagination on browsable view #2073

bwlee opened this issue Nov 15, 2014 · 2 comments
Labels
Milestone

Comments

@bwlee
Copy link

bwlee commented Nov 15, 2014

Always got such error:

'Page' object has no attribute 'id'

Request Method: GET
Request URL: http://127.0.0.1:8000/data/strategies/
Django Version: 1.7.1
Exception Type: AttributeError
Exception Value:

'Page' object has no attribute 'id'

Exception Location: /Users/bwlee/.virtualenvs/wjz/lib/python2.7/site-packages/rest_framework/fields.py in get_attribute, line 70

if comment out below lines from settings.py, can show data in api mode.

REST_FRAMEWORK = {
'PAGINATE_BY': 10,
'PAGINATE_BY_PARAM': 'page_size',
}

BTW, json format can be shown both with or without pagination settings.

Thanks!

@xordoquy
Copy link
Collaborator

Reproduced here.

@tomchristie tomchristie added this to the 3.0 Release milestone Nov 15, 2014
@xordoquy
Copy link
Collaborator

I had a look at the test suite and there are already tests against the pagination.
This will require a bit more though relating to what went wrong in the above case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants