Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialGilang Ilhami
12,045 PointsDjango rest framework browsable api post form not showing
I am currently following along with the tutorial of the video and running it in my local machine. However, when I try to add more a data in the database, the field to post the data did not appeared. I tried to look it up in Google but not luck so far.
I am currently using Django 2.1 and DRF 3.8. Anybody have ideas about this?
Thank you.
2 Answers
collins muru
5,603 PointsFor anyone having this issue, ensure that you are authenticated on the browsable API.
Alex Koumparos
Python Development Techdegree Student 36,887 PointsHi Gilang,
When you browse to the page /api/v1/courses/
do you see your username at the top-right of the screen or do you see Log in
?
If you see Log in
, try logging in and seeing if that helps.
Otherwise, if you can see your username but you don't see a field for POSTing, then you might have a typo somewhere in your code.
Are you getting any error messages from the Django console? If so, please post them.
Also, please post your code, at least your views.py
and settings.py
.
Cheers,
Alex
Ian Salmon
Courses Plus Student 10,687 PointsIan Salmon
Courses Plus Student 10,687 PointsI had restart my server. Unfortunately, I didn't try that until AFTER I had done some research on the subject. Nothing has changed in recent DRF versions to create this issue. If anyone else is having an issue it is most likely an error in code transcribing.