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

Added Pagination for quiz app #34

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

hasanmdarif
Copy link
Contributor

@hasanmdarif hasanmdarif commented Mar 14, 2021

Added pagination.py for quiz app

Closes: #29

I have added pagination for quiz app.
used PageNumberPagination.
You can type http://127.0.0.1:8000/quiz/question/array/?page_size=1 to see the changes.
page_size can be any number you desire.

Please check the code and let me know if i need to improve it.

PS:- Kindly add relevant lebels for GSSOC'21 on issue #29

Copy link
Member

@diyajaiswal11 diyajaiswal11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, You've done good work but writing such long code for something that can be done in 2-4 lines is not a good practice. I would recommend you to go through this and remove unwanted code -
https://github.com/diyajaiswal11/Grocery-Task/blob/main/GroceryTask/groceries/views.py

@diyajaiswal11 diyajaiswal11 added enhancement New feature or request GSSOC21 To be counted for GSSoC'21 Level1 Level1 for GSSOC21 labels Mar 15, 2021
…tAPIView) for better implementation of pagination
@hasanmdarif
Copy link
Contributor Author

hasanmdarif commented Mar 15, 2021

Hey, You've done good work but writing such long code for something that can be done in 2-4 lines is not a good practice. I would recommend you to go through this and remove unwanted code -
https://github.com/diyajaiswal11/Grocery-Task/blob/main/GroceryTask/groceries/views.py

Hey Diya please check the changes i have made. Let me know if it is matching your interest or not.

GitHub
Contribute to diyajaiswal11/Grocery-Task development by creating an account on GitHub.

@hasanmdarif
Copy link
Contributor Author

Hey @diyajaiswal11 please review this pr:)

@Pushpit07
Copy link
Contributor

@hasanmdarif This can be done with just around 7-10 lines of code. You should not make changes to other files. Put up a new PR only with the code that is required for this functionality

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request GSSOC21 To be counted for GSSoC'21 Level1 Level1 for GSSOC21
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Pagination.py
3 participants