Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed SessionPostMiddleware

  • Loading branch information...
commit 317de3592bd1e1404d6f7b5ba57dc1a27d9d959b 1 parent dfc5c55
@samluescher authored
View
12 docs/installation.rst
@@ -106,18 +106,6 @@ Basic setup
.. _install-swfupload:
-- **Configuring the uploader (optional, recommended)**: If you are planning to
- use a Flash uploader such as ``SWFUpload``, add ``SessionPostMiddleware`` to
- your ``MIDDLEWARE_CLASSES``, before the standard ``SessionMiddleware``::
-
- MIDDLEWARE_CLASSES = (
- # ...
- 'media_tree.middleware.SessionPostMiddleware',
- # Notice that ``SessionPostMiddleware`` goes before
- # ``SessionMiddleware``
- 'django.contrib.sessions.middleware.SessionMiddleware',
- )
-
- **Optional**: Also add any Media Tree extensions that you are planning to use
to your ``INSTALLED_APPS``::
View
23 media_tree/admin/filenode_admin.py
@@ -428,19 +428,16 @@ def changelist_view(self, request, extra_context=None):
extra_context.update(self.init_changelist_view_options(request))
if app_settings.MEDIA_TREE_SWFUPLOAD:
- middleware = 'media_tree.middleware.SessionPostMiddleware'
- if not middleware in settings.MIDDLEWARE_CLASSES:
- request.user.message_set.create(message=_('You need to put %s in your MIDDLEWARE_CLASSES setting to use SWFUpload.') % middleware)
- else:
- swfupload_upload_url = reverse('admin:media_tree_filenode_upload')
- #swfupload_flash_url = os.path.join(settings.MEDIA_URL, STATIC_SUBDIR, 'lib/swfupload/swfupload_fp10/swfupload.swf')
- swfupload_flash_url = reverse('admin:media_tree_filenode_static_swfupload_swf')
- extra_context.update({
- 'file_types': app_settings.MEDIA_TREE_ALLOWED_FILE_TYPES,
- 'file_size_limit': app_settings.MEDIA_TREE_FILE_SIZE_LIMIT,
- 'swfupload_flash_url': swfupload_flash_url,
- 'swfupload_upload_url': swfupload_upload_url,
- })
+ swfupload_upload_url = reverse('admin:media_tree_filenode_upload')
+ #swfupload_flash_url = os.path.join(settings.MEDIA_URL, STATIC_SUBDIR, 'lib/swfupload/swfupload_fp10/swfupload.swf')
+ swfupload_flash_url = reverse('admin:media_tree_filenode_static_swfupload_swf')
+ extra_context.update({
+ 'file_types': app_settings.MEDIA_TREE_ALLOWED_FILE_TYPES,
+ 'file_size_limit': app_settings.MEDIA_TREE_FILE_SIZE_LIMIT,
+ 'swfupload_flash_url': swfupload_flash_url,
+ 'swfupload_upload_url': swfupload_upload_url,
+ })
+
if request.GET.get(IS_POPUP_VAR, None):
extra_context.update({'select_button': True})
View
7 media_tree/middleware.py
@@ -1,7 +0,0 @@
-from django.conf import settings
-
-class SessionPostMiddleware(object):
-
- def process_request(self, request):
- if not request.COOKIES.has_key(settings.SESSION_COOKIE_NAME) and request.POST.has_key(settings.SESSION_COOKIE_NAME):
- request.COOKIES[settings.SESSION_COOKIE_NAME] = request.POST[settings.SESSION_COOKIE_NAME]
Please sign in to comment.
Something went wrong with that request. Please try again.