Skip to content

Commit 177bfad

Browse files
author
Paweł Marczewski
committed
Add a 'sandbox' view to CUI
1 parent b6b2fa1 commit 177bfad

File tree

2 files changed

+20
-2
lines changed

2 files changed

+20
-2
lines changed

templates/cui/sandbox.html

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head>
5+
{% include "cui/_head.html" %}
6+
</head>
7+
8+
<body>
9+
10+
<h1>It works!</h1>
11+
12+
</body>

views.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,20 @@
2424
from django.template.response import SimpleTemplateResponse
2525
from django.conf import settings
2626

27-
def render_cui(context):
27+
def render_cui(context, template='cui/cui.html'):
2828
context = context.copy()
2929
context['STATIC_URL'] = settings.STATIC_URL
3030
context['DEBUG'] = settings.DEBUG
3131
context['ticket'] = { 'id': 'TICKET_ID' }
3232
context['in_devel'] = True
33-
return SimpleTemplateResponse('cui/cui.html', context)
33+
return SimpleTemplateResponse(template, context)
3434

35+
def cui_sandbox(request):
36+
'''Scaffolding to test various components of CUI.'''
37+
return render_cui({
38+
'in_local': True,
39+
'title': 'CUI sandbox'
40+
}, template='cui/sandbox.html')
3541

3642
def cui_test(request):
3743
'''Scaffolding for candidate interface JS tests.'''

0 commit comments

Comments
 (0)