diff options
Diffstat (limited to 'isotests/views.py')
-rw-r--r-- | isotests/views.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/isotests/views.py b/isotests/views.py index 1d118d3a..d9882128 100644 --- a/isotests/views.py +++ b/isotests/views.py @@ -50,7 +50,9 @@ def add_result(request): if request.POST: form = TestForm(request.POST) if form.is_valid() and request.POST['website'] == '': - form.save() + test = form.save(commit=False) + test.ip_address = request.META.get("REMOTE_ADDR", None) + test.save() return HttpResponseRedirect('/isotests/thanks/') else: form = TestForm() |