diff options
author | Dan McGee <dan@archlinux.org> | 2011-04-28 15:04:45 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-04-28 17:52:51 -0500 |
commit | b5be7d6fd60ade6af2fb9379fa43e3e93e60736e (patch) | |
tree | dc9ec06827b7b11ed22112d5bc1db07662d6bba2 /isotests/views.py | |
parent | cfb4f1bc6a45ddfc068acabc6efb9a4e350dd544 (diff) |
isotests: record submission IP address
Helps a lot if we start seeing bogus submissions to track down and
suppress the issue.
Signed-off-by: Dan McGee <dan@archlinux.org>
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() |