Skip to content

Commit 3b569cc

Browse files
committed
static_root updated
1 parent 9af0acb commit 3b569cc

199 files changed

Lines changed: 67220 additions & 24 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

ESSArch_TA/api/templates/api/reception_upload.html

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{% extends 'admin/base_site.html' %}
2-
{% load dictionary_extras %}
3-
{% load js staticfiles%}
42
{% load url from future %}
53

64
{% block server-side-base %}active{% endblock %}
@@ -19,14 +17,13 @@ <h1 class="title">
1917
{% endblock %}
2018

2119
{% block app-extra-script %}
22-
<!-- {% js "api/js/jquery.js" %} -->
23-
{% js "api/js/jquery.ui.widget.js" %}
24-
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
25-
{% js "api/js/jquery.iframe-transport.js" %}
26-
<!-- The basic File Upload plugin -->
27-
{% js "api/js/jquery.fileupload.js" %}
28-
<!-- Calculate md5 -->
29-
{% js "api/js/spark-md5.js" %}
20+
<script type="text/javascript" src="/static/api/js/jquery.ui.widget.js"></script>
21+
<!-- The Iframe Transport is required for browsers without support for XHR file uploads -->
22+
<script type="text/javascript" src="/static/api/js/jquery.iframe-transport.js"></script>
23+
<!-- The basic File Upload plugin -->
24+
<script type="text/javascript" src="/static/api/js/jquery.fileupload.js"></script>
25+
<!-- Calculate md5 -->
26+
<script type="text/javascript" src="/static/api/js/spark-md5.js"></script>
3027

3128
<script type="text/javascript">
3229
var md5 = "",

ESSArch_TA/api/views.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
import shutil
3131
from django.views.generic.base import TemplateView
3232
from django.utils.decorators import method_decorator
33-
from django.contrib.auth.decorators import permission_required
33+
from django.contrib.auth.decorators import permission_required, login_required
3434
from django.conf import settings
3535
from chunked_upload.views import ChunkedUploadView, ChunkedUploadCompleteView
3636
from configuration.models import (
@@ -45,7 +45,7 @@
4545
class ReceptionUploadView(TemplateView):
4646
template_name = 'api/reception_upload.html'
4747

48-
@method_decorator(permission_required('essarch.change_ingestqueue'))
48+
@method_decorator(login_required)
4949
def dispatch(self, *args, **kwargs):
5050
return super(ReceptionUploadView, self).dispatch( *args, **kwargs)
5151

@@ -91,19 +91,13 @@ def move_to_destination(self, chunked_upload, request):
9191

9292
# Create a new information package folder ready for deliver
9393
ip_path = os.path.join( eft_path, ip_uuid)
94-
print 'ippath'
95-
print ip_path
94+
dest_file_path = os.path.join(ip_path, chunked_upload.filename)
95+
9696
if os.path.exists(ip_path):
97-
print 'path exists'
98-
shutil.move(tmp_file_path, ip_path)
99-
print 'file moved'
100-
97+
shutil.move(tmp_file_path, dest_file_path)
10198
else:
102-
print 'path vill be created'
10399
os.makedirs(ip_path)
104-
print 'file will be moved'
105-
shutil.move(tmp_file_path, ip_path)
106-
print 'file moved'
100+
shutil.move(tmp_file_path, dest_file_path)
107101

108102
chunked_upload.delete(delete_file=True)
109103

ESSArch_TA/config/httpd-eta.conf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ Listen 443
4444
SSLCACertificateFile /ESSArch/pd/python/lib/python2.7/site-packages/ESSArch_TA/config/ssl/ca.crt
4545

4646
###
47-
Alias /static/ /ESSArch/pd/python/lib/python2.7/site-packages/ESSArch_TA/static/
47+
Alias /static/ /ESSArch/pd/python/lib/python2.7/site-packages/ESSArch_TA/static_root/
4848

49-
<Directory /ESSArch/pd/python/lib/python2.7/site-packages/ESSArch_TA/static/>
49+
<Directory /ESSArch/pd/python/lib/python2.7/site-packages/ESSArch_TA/static_root/>
5050
Order deny,allow
5151
Allow from all
5252
</Directory>

0 commit comments

Comments
 (0)