Do not redefine imported slugify function
This commit is contained in:
@@ -1,13 +0,0 @@
|
||||
from django.http import HttpResponse
|
||||
from django.core.files.uploadedfile import SimpleUploadedFile
|
||||
|
||||
def sendfile(request, filename):
|
||||
return = HttpResponse(IterFile(filename))
|
||||
|
||||
class IterFile(object):
|
||||
def __init__(self, filename):
|
||||
self.file = SimpleUploadedFile(name=filename, content=open(filename).read())
|
||||
|
||||
def __iter__(self):
|
||||
return self.file.chunks()
|
||||
|
||||
Reference in New Issue
Block a user