-
Notifications
You must be signed in to change notification settings - Fork 0
/
views.py
executable file
·51 lines (43 loc) · 1.73 KB
/
views.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
"""
.. module:: views
:synopsis: A useful module indeed.
"""
import os
from django.http import HttpResponse
from django.template.loader import render_to_string
from django.shortcuts import redirect
from django.conf import settings
import requests
#hwbi_server = os.environ['REST_SERVER_8']
hwbi_server = 'https://server8'
# ################ How model name appears on web page ################
header = 'PiSCES'
# ####################################################################
def pisces_landing_page(request):
""" Returns the html of the landing page for qed. """
html = render_to_string('01epa_drupal_header.html', {})
html += render_to_string('02epa_drupal_header_bluestripe.html', {})
html += render_to_string('03epa_drupal_section_title.html', {})
if settings.IS_PUBLIC:
pass
else:
pass
html += render_to_string('09epa_drupal_splashscripts.html', {})
html += render_to_string('10epa_drupal_footer.html', {})
response = HttpResponse()
response.write(html)
return response
def file_not_found(request, exeption=None):
""" Returns the html of the landing page for qed. """
html = render_to_string('01epa_drupal_header.html', {})
html += render_to_string('02epa_drupal_header_bluestripe.html', {})
html += render_to_string('03epa_drupal_section_title.html', {})
if settings.IS_PUBLIC:
html += render_to_string('04qed_splash_landing_public.html', {'title': 'qed'})
else:
html += render_to_string('04qed_splash_landing_intranet.html', {'title': 'qed'})
html += render_to_string('09epa_drupal_splashscripts.html', {})
html += render_to_string('10epa_drupal_footer.html', {})
response = HttpResponse()
response.write(html)
return response