Algo-Phantoms / Algo-Phantoms-Backend

💻 Algo-Phantoms-Backend is an Application that provides pathways and quizzes along with a code editor to help you towards your DSA journey.📰🔥 This repository contains the REST APIs of the application.✨
MIT License
43 stars 37 forks source link

Added Pagination for quiz app #34

Open hasanmdarif opened 3 years ago

hasanmdarif commented 3 years ago

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

hasanmdarif commented 3 years ago

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
diyajaiswal11/Grocery-Task
Contribute to diyajaiswal11/Grocery-Task development by creating an account on GitHub.
hasanmdarif commented 3 years ago

Hey @diyajaiswal11 please review this pr:)

Pushpit07 commented 3 years ago

@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