Forums

Hosting Django app at subdirectory URL

Hi,

Would it be possible to make my Django REST app available at a non-root URL ('http://some-app.pythonanywhere.com/api/') and keep '/' static, for the frontend? I have a 'hacker' account.

Help would be deeply appreciated as I have a deadline fast approaching! Thanks folks.

Rob

yup- if you are using django rest framework for your rest app, read the drf docs. eg: if you are using a router to route to urls, find out you are currently "registering" your router to "/"