Update post handling after migration

This commit is contained in:
Jonathan Cremin 2015-01-17 23:59:29 +00:00
parent 5972323cc1
commit 099892e56f

View file

@ -19,8 +19,8 @@ def catchall(request, id):
def home(request): def home(request):
context = {'form': LinkForm} context = {'form': LinkForm}
if 'link' in request.POST: if 'url' in request.POST:
link = Link(link=request.POST['url']) link = Link(url=request.POST['url'])
link.save(); link.save();
context['short_url'] = "http://" + str(request.get_host()) + "/" + str(link.id) context['short_url'] = "http://" + str(request.get_host()) + "/" + str(link.id)
return render(request, 'index.html', context) return render(request, 'index.html', context)