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 trialJassim Alhatem
20,883 PointsDjango REST Framework
Is there a way to override django's REST framework default interface? I've been trying for a minute and I still can't figure it out.
Chris Freeman
Treehouse Moderator 68,441 PointsLet me know if this was a sufficient answer, I can change comment to answer.
Chris Freeman
Treehouse Moderator 68,441 Pointsmoving comment to answer
1 Answer
Chris Freeman
Treehouse Moderator 68,441 PointsAfter several hot minutes, I found default templates located in the directory <your_venv_dir>/lib/<your_python_version>/site-packages/rest_framework/templates/rest_framework
.
Then, on this page, it discusses how to include your own templates to override the built-in ones. I suspect you'd need to put your versions in a project directory then add your templates directory to the settings.py file. IIRC, your templates directory structure should mirror the call path. For exaxple, your base.html
would be placed in: <your_proj_temple_dir>/rest_framework/base.html
It might be as simple as creating your own base.html
file to change the look and feel.
Good luck!!
Jassim Alhatem
20,883 PointsJassim Alhatem
20,883 PointsThank you so much, Chris.