Repository: Cloud-CV/EvalAI
Issue: Add pagination to challenge List page
GitHub labels: GSOC-2019

medium-difficulty

frontend

Need to add pagination for each challenge list (Past, Ongoing & Future) on challenge page.

For pagination use load more, clicking on which gets next list of data.

Let me know if anyone finds it difficult :)

is the static data for pagination already there ? I see nothing. 

I am interested in this. Can you assign me ?

@anweshnayak sure go ahead.
 You can create challenges by using django admin for now.
And yes, you have to include the pagination in same view.
Also for pagination use load more instead of page numbers.

@aka-jain ne doubt regarding the pagination. As the attributes from the django-admin is not showing up in the challenge-list.html ? So how shall I proceed with it ?


Sorry, I'm not getting your point @anweshknayak.

After I created challenges in django-admin. The html file should render all that created in django-admin as per the html file ? But it isn't ? 

Yup, then what is coming there? Any error in console?

![123](https://cloud.githubusercontent.com/assets/8139783/21621131/ab642dc2-d21d-11e6-95fe-2dfaa3bd630c.jpg)

nothing

![screenshot from 2017-01-04 01 32 49](https://cloud.githubusercontent.com/assets/8139783/21621153/c22944b6-d21d-11e6-9bff-f241af28aa2c.png)


Check console log.

 ERROR "GET /api/challenges/present HTTP/1.1" 500 21876
[2017-01-03 20:04:58] ERROR "GET /api/challenges/present HTTP/1.1" 500 21876
[2017-01-03 20:04:58] ERROR "GET /api/auth/user/ HTTP/1.1" 500 21844
[2017-01-03 20:04:58] ERROR "GET /api/auth/user/ HTTP/1.1" 500 21844
[2017-01-03 20:05:00] ERROR "GET /api/auth/user/ HTTP/1.1" 500 21844
[2017-01-03 20:05:00] ERROR "GET /api/auth/user/ HTTP/1.1" 500 21844
[2017-01-03 20:05:01] ERROR "GET /api/challenges/present HTTP/1.1" 500 21870
[2017-01-03 20:05:01] ERROR "GET /api/challenges/present HTTP/1.1" 500 21870



Are you logged in? I think your token has been expired. So try to open it in incognito.

Yes im logged in. Tried in incognito not working. It is an issue from my end ?

@anweshknayak can you try with this url http://localhost:8000/api/auth/user and try entering details there? Let me know what the response is. 

HTTP 401 Unauthorized
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept
WWW-Authenticate: Token

{
    "detail": "Authentication credentials were not provided."
}

Can you copy the token from django admin and then set it as authorization header in the API call that you are making. You can make API calls using the django docs that we have integrated with the project. Link for django docs to test the live API: http://localhost:8000/docs

![screenshot from 2017-01-04 02 44 11](https://cloud.githubusercontent.com/assets/8139783/21623311/c5ab6970-d227-11e6-80e0-521567f54e54.png)


@anweshknayak Please set authorization header as `Token <token_id>`. Then it will work. 

For the front end pagination load more button  ,this [link](http://fdietz.github.io/recipes-with-angular-js/common-user-interface-patterns/paginating-using-infinite-results.html) can help.

@anweshknayak : Any progress on this? 

@anweshknayak : sorry to inform you late, but why you are using prev and next button here? We only have to show load more button. Do you need any help?

This task is free. Anybody up for it?

@aka-jain Can i work on this

@jainarunarunjain : sure go ahead. let me know if you need any help.

@jainarunarunjain you still working on this ? I can do this if you wish. Otherwise you can carry on. Let me know

@anweshknayak sure, if you want then you can work on this.

@jainarunarunjain  yup sure thanks :)


@anweshknayak : are you still trying this?

@aka-jain Is it dependent on the pagination thing ? I was waiting for that to be fixed first as it was throwing error. 

Anyone interested to solve this issue? Let me know.

I would like to work on this. Can I?

Sure @AliRaza3997 :) 

@AliRaza3997 any progress on this? 


@deshraj I won't be able to work on this for the next week. You can assign it to someone else. Sorry, for the inconvenience. 

@aka-jain : is this still required ?

Yes @taranjeet , We have to implement this on All Challenges Pages.

@aka-jain @RishabhJain2018 Any update on this? Is this done?

@spyshiv No I don't think so.

@Obtin: feel free to work on this issue. 

We haven't reached to the state where we will need to add it in the client side. We already have the support for pagination on the backend side. We can revisit this later. Closing it as of now.