Skip to content

Conversation

Tanuj22
Copy link
Member

@Tanuj22 Tanuj22 commented Nov 22, 2019

No description provided.

@Tanuj22 Tanuj22 requested a review from ajatprabha December 16, 2019 17:46
Copy link
Member

@ajatprabha ajatprabha left a comment

Choose a reason for hiding this comment

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

There are places where you have made list of dictionaries for drop-downs. If they can be fetched from an OPTION HTTP call that would be better.

@Tanuj22
Copy link
Member Author

Tanuj22 commented Dec 25, 2019

There are places where you have made list of dictionaries for drop-downs. If they can be fetched from an OPTION HTTP call that would be better.

I didn't understand. Can you elaborate more?

@ajatprabha
Copy link
Member

ajatprabha commented Dec 25, 2019

I didn't understand. Can you elaborate more?

Basically, you can get the value of available options for models.ChoiceField if you hit the API endpoint with an OPTIONS request. Try it first, you'll understand.
Eg.: curl -i -X OPTIONS http://localhost:8000/api/<path-to-api-view>

@Tanuj22
Copy link
Member Author

Tanuj22 commented Dec 26, 2019

I didn't understand. Can you elaborate more?

Basically, you can get the value of available options for models.ChoiceField if you hit the API endpoint with an OPTIONS request. Try it first, you'll understand.
Eg.: curl -i -X OPTIONS http://localhost:8000/api/<path-to-api-view>

I am not finding a way to send OPTIONS request using axios. I only relevent thing I could find was
https://www.django-rest-framework.org/api-guide/metadata/
which used GET request to access options.

BTW ,what is the problem with making dictionaries for dropdown?

@Tanuj22 Tanuj22 closed this Dec 26, 2019
@Tanuj22 Tanuj22 reopened this Dec 26, 2019
@ajatprabha
Copy link
Member

Is this complete now @Tanuj22?

@Tanuj22
Copy link
Member Author

Tanuj22 commented Apr 7, 2020

@ajatprabha No, This PR also contains the part for TA Coordinator which is half completed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants