DjangoRestFramework browsable api looks different

2019-09-11 15:36发布

问题:

When I do python manage.py runserver I see this:

After I deployed it to AWS, I accessed the URL and this is what I see:

Why does it look so different after deploying it? And how do I get it to look like how it is on the local server?

回答1:

following link may help you solving this error

missing-static-directory

and if this does not work then you can recollect static files with...

python /path/to/your/project/manage.py collectstatic --noinput


回答2:

This isn't an issue with Django REST framework. You are not serving the static files. Django explains how to deploy static files here