uncomment convert on file save

This commit is contained in:
Sanj 2011-05-27 14:56:25 +05:30
parent e4f5a5050f
commit b8856912ec
3 changed files with 7 additions and 1 deletions

View File

@ -156,4 +156,4 @@ class Type(models.Model):
verbose_name = 'File Type'
verbose_name_plural = 'File Types'
# post_save.connect(convertFile, sender=File)
post_save.connect(convertFile, sender=File)

View File

@ -3,4 +3,5 @@ import views
urlpatterns = patterns('',
(r'addFolder', views.add_folder),
(r'upload', views.upload_files),
)

View File

@ -9,6 +9,7 @@ import os
from os.path import join, isdir, getmtime, basename
import shutil
'''
class folder_names(object):
def __iter__(self):
@ -22,6 +23,10 @@ def getFolderList():
full_dirs.sort(key=lambda x: getmtime(x), reverse=True)
return map(lambda x: (basename(x), basename(x)), full_dirs)
@login_required
def upload_files(request):
return render_to_response("upload_files.html")
class FolderSelect(forms.widgets.Select):
def _get_choices(self):
return getFolderList()