Update post handling after migration
This commit is contained in:
parent
5972323cc1
commit
099892e56f
1 changed files with 2 additions and 2 deletions
|
@ -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)
|
Loading…
Add table
Add a link
Reference in a new issue