mirror of
https://github.com/retspen/webvirtcloud
synced 2025-07-31 12:41:08 +00:00
SHOW_PROFILE_EDIT_PASSWORD, SHOW_ACCESS_ROOT_PASSWORD, SHOW_ACCESS_SSH_KEYS in settings.py are not inherited in templates. they are now forwarded directly into views.
This commit is contained in:
parent
c58374ea2e
commit
6e5e10594c
4 changed files with 9 additions and 5 deletions
|
@ -227,14 +227,14 @@
|
|||
{% trans "Console" %}
|
||||
</a>
|
||||
</li>
|
||||
{% if SHOW_ACCESS_ROOT_PASSWORD %}
|
||||
{% if show_access_root_password %}
|
||||
<li role="presentation">
|
||||
<a href="#rootpasswd" aria-controls="rootpasswd" role="tab" data-toggle="tab">
|
||||
{% trans "Root Password" %}
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
{% if SHOW_ACCESS_SSH_KEYS %}
|
||||
{% if show_access_ssh_keys %}
|
||||
<li role="presentation">
|
||||
<a href="#sshkeys" aria-controls="sshkeys" role="tab" data-toggle="tab">
|
||||
{% trans "SSH Keys" %}
|
||||
|
@ -253,7 +253,7 @@
|
|||
{% endifequal %}
|
||||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% if SHOW_ACCESS_ROOT_PASSWORD %}
|
||||
{% if show_access_root_password %}
|
||||
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="rootpasswd">
|
||||
<p>{% trans "You need shut down your instance and enter a new root password." %}</p>
|
||||
<form class="form-inline" method="post" role="form">{% csrf_token %}
|
||||
|
@ -271,7 +271,7 @@
|
|||
<div class="clearfix"></div>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% if SHOW_ACCESS_SSH_KEYS %}
|
||||
{% if show_access_ssh_keys %}
|
||||
<div role="tabpanel" class="tab-pane tab-pane-bordered" id="sshkeys">
|
||||
<p>{% trans "You need shut down your instance and choose your public key." %}</p>
|
||||
<form class="form-inline" method="post" role="form">{% csrf_token %}
|
||||
|
|
|
@ -344,6 +344,9 @@ def instance(request, compute_id, vname):
|
|||
formats = conn.get_image_formats()
|
||||
default_bus = settings.INSTANCE_VOLUME_DEFAULT_BUS
|
||||
busses = conn.get_busses()
|
||||
default_bus = settings.INSTANCE_VOLUME_DEFAULT_BUS
|
||||
show_access_root_password = settings.SHOW_ACCESS_ROOT_PASSWORD
|
||||
show_access_ssh_keys = settings.SHOW_ACCESS_SSH_KEYS
|
||||
|
||||
try:
|
||||
instance = Instance.objects.get(compute_id=compute_id, name=vname)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue