python - Django REST Framework and HTML pages -


i'm working on project uses django on server side , have rest(ish) api going.

one thing i'm wondering about. considered ok practice deliver django html templates via api endpoints? example, going www.rooturl.com, api endpoint called , html delivered. then, when user clicks on, faq, request made www.rooturl.com/faq , html template delivered again? or should faq items delivered json? or maybe give both alternatives through content negotiation? @ point html content delivered?

i couldn't find satisfying answer google-fu.

i don't see point of using django html templates in api endpoint since whole point of using rest api have server side , client side independent 1 another. yes, faq items should delivered json , displayed want on client side.


Comments

Popular posts from this blog

python - How to insert QWidgets in the middle of a Layout? -

python - serve multiple gunicorn django instances under nginx ubuntu -

module - Prestashop displayPaymentReturn hook url -