django-rest-swagger
django-rest-swagger copied to clipboard
Can't override title in base template
Hi there -
I created a simple pull request to solve this. I want to override the
Thanks very much,
Alan
This should probably be set to the same value as title in:
get_swagger_view(title='my title')
by default (maybe, + 'Swagger UI')
and overridable, no?
FYI, PR is https://github.com/marcgibbons/django-rest-swagger/pull/666, nice one @awgreenblatt!
Agreed, the title in base.html should default to whatever was set in get_swagger_view(), but to me that's a separate issue. I'm not personally sure how to get the title from the schema into the renderer context so it could be used in the template. I'd personally rather if we kept the two separate so we didn't hold up being able to override the template. Unless of course, someone else wants to provide the code to initialize the title in base.html to that set in get_swagger_view().
I'd personally rather if we kept the two separate so we didn't hold up being able to override the template.
:+1: - hope this gets in soon!
A template override block on base.html would be a good start :-)