1
votes

Got attuned to work on Django project that used Django Rest Framework. Current GUI uses default styling.

I would like to re-style it.

There is an article describing re-styling: http://www.django-rest-framework.org/topics/browsable-api/

However I don't understand where to add rest_framework folder with the api.html. My existing project doesn't contain any folder related to REST.

"To customize the default style, create a template called rest_framework/api.html that extends from rest_framework/base.html"

Where to put rest_framework?

2

2 Answers

2
votes

It's up to you, every template dir will overwrite the default one.

I would recommend to use

/yourapp/yourapp/templates/rest_framework

as you probably want to use your template for the whole app.

1
votes

I have found out, that putting rest_framework into /templates/ folder does the trick.

So the full path is: /templates/rest_framework/api.html.