1
0
mirror of https://github.com/r4sas/py-i2phosts synced 2025-01-22 20:44:55 +00:00

pyi2phosts/postkey/views.py: use redirect() instead of HttpResponseRedirect()

This commit is contained in:
Hidden Z 2010-11-05 06:31:47 +00:00
parent dc02bc951c
commit 37994951c1

View File

@ -3,7 +3,7 @@ import re
from django import forms from django import forms
from django.forms import ModelForm from django.forms import ModelForm
from django.shortcuts import render_to_response from django.shortcuts import render_to_response
from django.http import HttpResponseRedirect from django.shortcuts import redirect
from django.template import RequestContext from django.template import RequestContext
import settings import settings
@ -50,7 +50,7 @@ def addkey(request):
log.debug('submit is valid, saving') log.debug('submit is valid, saving')
form.save() form.save()
request.session['hostname'] = form.cleaned_data['name'] request.session['hostname'] = form.cleaned_data['name']
return HttpResponseRedirect('success') return redirect('pyi2phosts.postkey.views.success')
else: else:
form = AddForm() form = AddForm()
return render_to_response('postkey.html', { return render_to_response('postkey.html', {