Fix a bug : post where not updated after edit
This commit is contained in:
parent
3ac4540db4
commit
8966c2f85b
6
views.py
6
views.py
|
@ -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')
|
||||
|
|
Loading…
Reference in New Issue
Block a user