Ask Your Question
0

How to propperly add link to Horizon login page

asked 2015-03-27 11:53:36 -0600

jproulx gravatar image

I want to add links user registration and password reset to the Horizon login page.

I have the functionaluty implemented externally and I can force teh links in by editing horizon/templates/auth/_login.html, but whenever the package updates I will loose this edit and it seems overkill to manage a forked version of Horizon to implement a one line change.

Is there a better way to inject local content then this?

We also manage a local override for the nova instance creation whihc is nice for overiding functions like that but I can't see how to override jsut text in a template that doesn't seem to generated by a function I could override.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
0

answered 2015-03-27 14:16:47 -0600

david-lyle gravatar image

There is currently not an easy way to inject the content. The current model would require overriding the auth/_login.html template. Adding something like

{% block custom_content %}
    {% include "auth/_custom_content.html" %} 
{% endblock %}

to the auth/_login.html template would be relatively easy in upstream horizon, but the block location and scope would not work for everyone. And you would still have to replace the contents of an empty file, auth/_custom_content.html. But that would be automate-able.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-03-27 11:53:36 -0600

Seen: 277 times

Last updated: Mar 27 '15