-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathalgorithms.py
32 lines (23 loc) · 1.02 KB
/
algorithms.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
from django.template.loader import render_to_string
from django.http import HttpResponse
from django.shortcuts import redirect
import os
from django.conf import settings
from . import links_left
from . import views
def algorithm_page(request, model='pisces', header='none'):
header = views.header
x = render_to_string('pisces_algorithm.html')
""" Returns the html of the references page for pisces. """
html = render_to_string('01epa_drupal_header.html', {})
html += render_to_string('02epa_drupal_header_bluestripe_onesidebar.html', {})
html += render_to_string('03pisces_generic_drupal_section_title.html', {})
html += render_to_string('04ubertext_start_index_drupal.html', {
'TITLE': header + ' Algorithms',
'TEXT_PARAGRAPH': x})
html += render_to_string('04ubertext_end_drupal.html', {})
html += links_left.ordered_list(model, 'algorithms')
html += render_to_string('10epa_drupal_footer.html', {})
response = HttpResponse()
response.write(html)
return response