{% block content %}
<div id="content-main">
<form action="{% query_string %}" method="post">
+ {% csrf_token %}
<div>
{% if form.errors %}<p class="errornote">{% trans 'Please correct the following errors.' %}</p>{% endif %}
<fieldset class="module aligned">
</div>
</form>
</div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
{% block content %}
<div id="content-main">
<form action="{% query_string "" "filter_date,filter_type,q" %}" method="post">
+ {% csrf_token %}
<div>
{% if form.errors %}<p class="errornote">{% trans 'Please correct the following errors.' %}</p>{% endif %}
<fieldset class="module aligned">
</div>
</form>
</div>
-{% endblock %}
\ No newline at end of file
+{% endblock %}
from django.core.urlresolvers import reverse
from django.core.exceptions import ImproperlyConfigured
from django.dispatch import Signal
+from django.views.decorators.csrf import csrf_exempt
from django.utils.encoding import smart_unicode, smart_str
mkdir = staff_member_required(never_cache(mkdir))
+@csrf_exempt
def upload(request):
"""
Multipe File Upload.
upload = staff_member_required(never_cache(upload))
+@csrf_exempt
def _check_file(request):
"""
Check if file already exists on the server.
Upload file to the server.
"""
+ print 'a'
from django.core.files.move import file_move_safe
if request.method == 'POST':
# POST UPLOAD SIGNAL
filebrowser_post_upload.send(sender=request, path=request.POST.get('folder'), file=FileObject(os.path.join(DIRECTORY, folder, filedata.name)))
return HttpResponse('True')
-_upload_file = flash_login_required(_upload_file)
+_upload_file = csrf_exempt(flash_login_required(_upload_file))
# delete signals