Do not redefine imported slugify function

This commit is contained in:
Roberto Rosario
2011-04-23 22:47:49 -04:00
parent a7fb94e208
commit fe4ff2c035
2 changed files with 5 additions and 16 deletions
@@ -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()