77from main .forms import PostForm , DeletePostForm
88from main .views .thread import view
99from main .views .paging import page as home
10+ from main .views .decorators import vospapiers
1011
1112import json
1213
1314
15+ @vospapiers
1416def raw (request , post_id ):
1517 post = get_object_or_404 (Post , id = int (post_id ), active = True )
1618 infos = {
@@ -26,6 +28,7 @@ def raw(request, post_id):
2628 return HttpResponse (json .dumps (infos ))
2729
2830
31+ @vospapiers
2932def edit (request , post_id ):
3033 post = get_object_or_404 (Post , id = int (post_id ), active = True )
3134 if request .method == 'POST' :
@@ -49,6 +52,7 @@ def edit(request, post_id):
4952 return render_to_response ('edit.html' , context )
5053
5154
55+ @vospapiers
5256def delete (request , post_id ):
5357 post = get_object_or_404 (Post , id = int (post_id ), active = True )
5458 if request .method == 'POST' :
@@ -71,6 +75,7 @@ def delete(request, post_id):
7175 return render_to_response ('delete.html' , context )
7276
7377
78+ @vospapiers
7479def history (request , post_id ):
7580 post = get_object_or_404 (Post , id = int (post_id ), active = True )
7681 hist = [post ]
0 commit comments