Merge pull request #136 from dessibelle/master

Excluded hidden files from image browser and modified caching headers
This commit is contained in:
riklaunim 2014-10-20 23:48:53 +02:00
commit 3fb976a96d
2 changed files with 3 additions and 2 deletions

View File

@ -1,10 +1,11 @@
from django.conf.urls import patterns, url
from django.contrib.admin.views.decorators import staff_member_required
from django.views.decorators.cache import never_cache
from ckeditor import views
urlpatterns = patterns(
'',
url(r'^upload/', staff_member_required(views.upload), name='ckeditor_upload'),
url(r'^browse/', staff_member_required(views.browse), name='ckeditor_browse'),
url(r'^browse/', never_cache(staff_member_required(views.browse)), name='ckeditor_browse'),
)

View File

@ -98,7 +98,7 @@ def get_image_files(user=None, path=''):
return
for filename in storage_list[STORAGE_FILES]:
if os.path.splitext(filename)[0].endswith('_thumb'):
if os.path.splitext(filename)[0].endswith('_thumb') or os.path.basename(filename).startswith('.'):
continue
filename = os.path.join(browse_path, filename)
yield filename