Show server hostname
This commit is contained in:
parent
0bb02a4c0f
commit
ab4b961cb5
2 changed files with 9 additions and 3 deletions
|
@ -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>
|
||||
|
|
|
@ -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…
Reference in a new issue