mirror of
https://github.com/r4sas/py-i2phosts
synced 2025-01-08 22:07:55 +00:00
pyi2phosts/postkey/views.py: check for hostname presence in success()
This commit is contained in:
parent
37994951c1
commit
16c142a5c1
@ -59,9 +59,12 @@ def addkey(request):
|
|||||||
}, context_instance=RequestContext(request))
|
}, context_instance=RequestContext(request))
|
||||||
|
|
||||||
def success(request):
|
def success(request):
|
||||||
|
if 'hostname' in request.session:
|
||||||
return render_to_response('success_submission.html', {
|
return render_to_response('success_submission.html', {
|
||||||
'title': settings.SITE_NAME,
|
'title': settings.SITE_NAME,
|
||||||
'hostname': request.session['hostname'],
|
'hostname': request.session['hostname'],
|
||||||
})
|
})
|
||||||
|
else:
|
||||||
|
return redirect('/')
|
||||||
|
|
||||||
log = get_logger(filename=settings.LOG_FILE, log_level=settings.LOG_LEVEL)
|
log = get_logger(filename=settings.LOG_FILE, log_level=settings.LOG_LEVEL)
|
||||||
|
Loading…
Reference in New Issue
Block a user