diff options
author | Filipp Lepalaan <f@230.to> | 2013-11-19 11:16:17 +0200 |
---|---|---|
committer | Filipp Lepalaan <f@230.to> | 2013-11-19 11:16:17 +0200 |
commit | 1c760af665e388f921b770d9c5c3ded1fc11f626 (patch) | |
tree | 7dede4db584eedaf525c5e3e42b14f9dd8e83a50 /apps/issues | |
parent | 297419f370ea87458017ee506a2e551e9068b66b (diff) | |
download | motor.old-1c760af665e388f921b770d9c5c3ded1fc11f626.tar.gz motor.old-1c760af665e388f921b770d9c5c3ded1fc11f626.tar.bz2 motor.old-1c760af665e388f921b770d9c5c3ded1fc11f626.zip |
Switching machines
Diffstat (limited to 'apps/issues')
-rw-r--r-- | apps/issues/views.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/apps/issues/views.py b/apps/issues/views.py index ed60ed7..565bc6e 100644 --- a/apps/issues/views.py +++ b/apps/issues/views.py @@ -1,3 +1,5 @@ +import json +from django.shortcuts import render from django.views.generic.list import ListView from django.views.generic.edit import FormView, CreateView, UpdateView from apps.core.views import DefaultEditView, DefaultListView @@ -16,3 +18,10 @@ class IssueCreateView(CreateView): class IssueEditView(DefaultEditView): model = Issue + + +def list_issues(request, idx=0): + fh = open('fixtures.json', 'r') + data = json.loads(fh.read()) + question = data['questions'][int(idx)] + return render(request, "issues/index.html", question) |