diff options
author | hardythe1 | 2012-03-21 17:18:29 +0530 |
---|---|---|
committer | hardythe1 | 2012-03-21 17:18:29 +0530 |
commit | d6b315e816525ee114a22e1c66a35b5e30e86258 (patch) | |
tree | af6a22d442f49d506989b89647c98824af108cab /testapp/exam/views.py | |
parent | 8bedc83e30c80636df18b301a84c69cb6a543e53 (diff) | |
parent | 2f21a4a007ae9b51fadd7832fe90506f19e309e2 (diff) | |
download | online_test-d6b315e816525ee114a22e1c66a35b5e30e86258.tar.gz online_test-d6b315e816525ee114a22e1c66a35b5e30e86258.tar.bz2 online_test-d6b315e816525ee114a22e1c66a35b5e30e86258.zip |
Merge branch 'admin_module' of github.com:hardythe1/online_test into admin_module
Diffstat (limited to 'testapp/exam/views.py')
-rw-r--r-- | testapp/exam/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/testapp/exam/views.py b/testapp/exam/views.py index 564f317..a529983 100644 --- a/testapp/exam/views.py +++ b/testapp/exam/views.py @@ -153,8 +153,10 @@ def add_question(request,question_id=None): form = QuestionForm(request.POST) if form.is_valid(): data = form.cleaned_data - if question_id == None: + if question_id == None: form.save() + question = Question.objects.order_by("-id")[0] + question.tags.add(form['tags'].data) return my_redirect("/exam/manage/questions") else: d = Question.objects.get(id=question_id) |