From 099892e56f02c683879d05625b1215212fda7c9e Mon Sep 17 00:00:00 2001 From: Jonathan Cremin Date: Sat, 17 Jan 2015 23:59:29 +0000 Subject: [PATCH] Update post handling after migration --- links/views.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/links/views.py b/links/views.py index 8d3f551..46731f2 100644 --- a/links/views.py +++ b/links/views.py @@ -19,8 +19,8 @@ def catchall(request, id): def home(request): context = {'form': LinkForm} - if 'link' in request.POST: - link = Link(link=request.POST['url']) + if 'url' in request.POST: + link = Link(url=request.POST['url']) link.save(); context['short_url'] = "http://" + str(request.get_host()) + "/" + str(link.id) return render(request, 'index.html', context) \ No newline at end of file