Fix a bug : post where not updated after edit

This commit is contained in:
Grégory Soutadé 2012-09-11 22:27:33 +02:00
parent 3ac4540db4
commit 8966c2f85b
1 changed files with 3 additions and 3 deletions

View File

@ -301,7 +301,7 @@ def edit_post(request, post_id):
if form.is_valid(): # All validation rules pass
if title != request.POST['title']:
post.remove()
post.createPost(request.POST['content'])
post.createPost(request.POST['content'])
form.save()
# Process the data in form.cleaned_data
# ...
@ -404,5 +404,5 @@ def preview(request, blog_id):
c = {'content' : content}
# return HttpResponseRedirect('http://' + b.name + '/preview.html')
return HttpResponseRedirect('http://' + 'localhost:8080' + '/preview.html')
return HttpResponseRedirect('http://' + b.name + '/preview.html')
# return HttpResponseRedirect('http://' + 'localhost:8080' + '/preview.html')