Browse Source

Show server hostname

pull/2/merge
Rodolfo Carvalho 10 years ago
parent
commit
ab4b961cb5
2 changed files with 9 additions and 3 deletions
  1. +7
    -2
      openshift/templates/openshift/index.html
  2. +2
    -1
      openshift/views.py

+ 7
- 2
openshift/templates/openshift/index.html View File

@ -10,8 +10,7 @@
body>div { border-bottom:1px solid #ddd; }
h1 { font-weight:normal; }
code { background: #ffd; }
#summary { background: #34383c; }
#summary h1 { color: #fff; }
#summary, #hostname { background: #34383c; color: #fff; }
#explanation { background:#eee; }
#instructions { background:#f6f6f6; }
#instructions ol li { margin: 0.2em 0 0.2em 2em; }
@ -47,4 +46,10 @@
before taking this project into a production environment.
</p>
</div>
<div id="hostname">
<p>
Server hostname: {{ HOSTNAME }}
</p>
</div>
</body></html>

+ 2
- 1
openshift/views.py View File

@ -1,6 +1,7 @@
import os
from django.shortcuts import render
# Create your views here.
def index(request):
return render(request, 'openshift/index.html')
return render(request, 'openshift/index.html', {'HOSTNAME': os.getenv('HOSTNAME', 'unknown')})

Loading…
Cancel
Save