Skip to content
This repository has been archived by the owner on Jan 11, 2021. It is now read-only.

Can't override title in base template #668

Open
awgreenblatt opened this issue Jun 27, 2017 · 4 comments · May be fixed by #786
Open

Can't override title in base template #668

awgreenblatt opened this issue Jun 27, 2017 · 4 comments · May be fixed by #786

Comments

@awgreenblatt
Copy link

Hi there -

I created a simple pull request to solve this. I want to override the <title> tag in base.html, but the only way currently to do so is to completely replace base.html, which is a bit overkill. I added a block around the title.

Thanks very much,

Alan

@decentral1se
Copy link
Contributor

decentral1se commented Jul 13, 2017

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 #666, nice one @awgreenblatt!

@awgreenblatt
Copy link
Author

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().

@decentral1se
Copy link
Contributor

decentral1se commented Jul 14, 2017

I'd personally rather if we kept the two separate so we didn't hold up being able to override the template.

👍 - hope this gets in soon!

@neilhut42
Copy link

A template override block on base.html would be a good start :-)

@victorcmoura victorcmoura linked a pull request Nov 13, 2018 that will close this issue
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants