File tree Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Expand file tree Collapse file tree 1 file changed +3
-10
lines changed Original file line number Diff line number Diff line change @@ -57,18 +57,11 @@ class PictureDeleteView(DeleteView):
57
57
model = Picture
58
58
59
59
def delete (self , request , * args , ** kwargs ):
60
- """
61
- This does not actually delete the file, only the database record. But
62
- that is easy to implement.
63
- """
64
60
self .object = self .get_object ()
65
61
self .object .delete ()
66
- if request .is_ajax ():
67
- response = JSONResponse (True , {}, response_mimetype (self .request ))
68
- response ['Content-Disposition' ] = 'inline; filename=files.json'
69
- return response
70
- else :
71
- return HttpResponseRedirect ('/upload/new' )
62
+ response = JSONResponse (True , {}, response_mimetype (self .request ))
63
+ response ['Content-Disposition' ] = 'inline; filename=files.json'
64
+ return response
72
65
73
66
def PictureListView (request ):
74
67
files = []
You can’t perform that action at this time.
0 commit comments