uncomment convert on file save
This commit is contained in:
parent
e4f5a5050f
commit
b8856912ec
3 changed files with 7 additions and 1 deletions
|
@ -156,4 +156,4 @@ class Type(models.Model):
|
||||||
verbose_name = 'File Type'
|
verbose_name = 'File Type'
|
||||||
verbose_name_plural = 'File Types'
|
verbose_name_plural = 'File Types'
|
||||||
|
|
||||||
# post_save.connect(convertFile, sender=File)
|
post_save.connect(convertFile, sender=File)
|
||||||
|
|
|
@ -3,4 +3,5 @@ import views
|
||||||
|
|
||||||
urlpatterns = patterns('',
|
urlpatterns = patterns('',
|
||||||
(r'addFolder', views.add_folder),
|
(r'addFolder', views.add_folder),
|
||||||
|
(r'upload', views.upload_files),
|
||||||
)
|
)
|
||||||
|
|
|
@ -9,6 +9,7 @@ import os
|
||||||
from os.path import join, isdir, getmtime, basename
|
from os.path import join, isdir, getmtime, basename
|
||||||
import shutil
|
import shutil
|
||||||
|
|
||||||
|
|
||||||
'''
|
'''
|
||||||
class folder_names(object):
|
class folder_names(object):
|
||||||
def __iter__(self):
|
def __iter__(self):
|
||||||
|
@ -22,6 +23,10 @@ def getFolderList():
|
||||||
full_dirs.sort(key=lambda x: getmtime(x), reverse=True)
|
full_dirs.sort(key=lambda x: getmtime(x), reverse=True)
|
||||||
return map(lambda x: (basename(x), basename(x)), full_dirs)
|
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):
|
class FolderSelect(forms.widgets.Select):
|
||||||
def _get_choices(self):
|
def _get_choices(self):
|
||||||
return getFolderList()
|
return getFolderList()
|
||||||
|
|
Loading…
Add table
Reference in a new issue