File tree 6 files changed +25
-5
lines changed
6 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -32,4 +32,9 @@ pip-delete-this-directory.txt
32
32
.coverage
33
33
.cache
34
34
nosetests.xml
35
- coverage.xml
35
+ coverage.xml
36
+
37
+ .idea
38
+
39
+ # Static files directory
40
+ apache
Original file line number Diff line number Diff line change 185
185
# Static files (CSS, JavaScript, Images)
186
186
# https://docs.djangoproject.com/en/2.0/howto/static-files/
187
187
188
- STATIC_URL = '/static/'
188
+ STATIC_URL = '/gifts/api-static/'
189
+
190
+ STATIC_ROOT = os .path .join (BASE_DIR , "static/apache" )
191
+
189
192
190
193
# TaRK base URL
191
194
TARK_SERVER = "http://tark.ensembl.org"
205
208
CELERY_ACCEPT_CONTENT = ['application/json' ]
206
209
CELERY_TASK_SERIALIZER = 'json'
207
210
CELERY_RESULT_SERIALIZER = 'json'
211
+
212
+ SWAGGER_SETTINGS = {
213
+ "USE_SESSION_AUTH" : False ,
214
+ "SECURITY_DEFINITIONS" : {},
215
+ "DOC_EXPANSION" : None
216
+ }
Original file line number Diff line number Diff line change 39
39
from . import settings
40
40
41
41
42
- schema_view = get_swagger_view (title = 'GIFTs API Documentation' )
42
+ schema_view = get_swagger_view (title = 'GIFTs API Documentation' , url = '/' if settings . env . DEV_ENV else '/gifts/api/' )
43
43
44
44
45
45
if settings .env .DEV_ENV :
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ djangorestframework==3.7.7
6
6
django-cors-headers == 2.4.0
7
7
django-filter == 1.1.0
8
8
django-postgres-extra == 1.21a8
9
- django-rest-swagger == 2.2.0
9
+ django-rest-swagger == 2.1.2
10
10
idna == 2.7
11
11
Markdown == 2.6.11
12
12
psycopg2-binary == 2.7.4
Original file line number Diff line number Diff line change 23
23
from rest_framework .views import APIView
24
24
from rest_framework .response import Response
25
25
from rest_framework import status
26
+ from rest_framework .permissions import IsAuthenticated
26
27
27
28
28
29
import coreapi
@@ -40,6 +41,7 @@ class AlignmentRunCreate(generics.CreateAPIView):
40
41
"""
41
42
Store an AlignmentRun
42
43
"""
44
+ permission_classes = (IsAuthenticated ,)
43
45
44
46
serializer_class = AlignmentRunSerializer
45
47
@@ -58,6 +60,8 @@ class AlignmentCreate(APIView):
58
60
Insert an Alignment
59
61
"""
60
62
63
+ permission_classes = (IsAuthenticated ,)
64
+
61
65
def post (self , request ):
62
66
63
67
try :
Original file line number Diff line number Diff line change @@ -120,6 +120,8 @@ class EnspUCigarCreate(generics.CreateAPIView):
120
120
Insert an alignment
121
121
"""
122
122
123
+ permission_classes = (IsAuthenticated ,)
124
+
123
125
serializer_class = EnspUCigarSerializer
124
126
125
127
@@ -185,7 +187,7 @@ class EnspUCigarFetchUpdateByAlignment(generics.RetrieveUpdateAPIView):
185
187
"""
186
188
Fetch/Update cigar/mdz by alignment id
187
189
"""
188
-
190
+ permission_classes = ( IsAuthenticated ,)
189
191
serializer_class = EnspUCigarSerializer
190
192
schema = ManualSchema (description = "Fetch/Update cigar/mdz by alignment id" ,
191
193
fields = [
You can’t perform that action at this time.
0 commit comments