0001-increase-djangorestframework-version-limit.patch
fargo/fargo/api_views.py | ||
---|---|---|
223 | 223 |
return super(ValidationAPI, self).get_queryset().filter(document_type=self.document_type) |
224 | 224 | |
225 | 225 |
def initial(self, request, document_type, *args, **kwargs): |
226 |
self.schema = utils.get_document_type_schema(settings, document_type) |
|
227 |
if not self.schema: |
|
226 |
self.document_type_schema = utils.get_document_type_schema(settings, document_type)
|
|
227 |
if not self.document_type_schema:
|
|
228 | 228 |
error = serializers.ValidationError('unknown document type') |
229 | 229 |
error.status_code = status.HTTP_404_NOT_FOUND |
230 | 230 |
raise error |
... | ... | |
233 | 233 | |
234 | 234 |
def get_serializer(self, *args, **kwargs): |
235 | 235 |
# pass schema to serializer class |
236 |
return super(ValidationAPI, self).get_serializer(schema=self.schema, *args, **kwargs) |
|
236 |
return super(ValidationAPI, self).get_serializer(schema=self.document_type_schema, *args, **kwargs)
|
|
237 | 237 | |
238 | 238 |
router = routers.SimpleRouter() |
239 | 239 |
router.register(r'validation/(?P<document_type>[^/]*)', ValidationAPI, |
requirements.txt | ||
---|---|---|
1 | 1 |
django>=1.7,<1.9 |
2 | 2 |
django-tables2<1.1 |
3 | 3 |
django-jsonfield >= 0.9.3 |
4 |
djangorestframework>=3.3,<3.4
|
|
4 |
djangorestframework>=3.3,<3.10
|
|
5 | 5 |
file-magic |
setup.py | ||
---|---|---|
112 | 112 |
'django-tables2>=1.5,<2.0', |
113 | 113 |
'django-jsonfield >= 0.9.3', |
114 | 114 |
'django-filter>1,<2.2', |
115 |
'djangorestframework>=3.4,<3.8',
|
|
115 |
'djangorestframework>=3.4,<3.10',
|
|
116 | 116 |
'file-magic', |
117 | 117 |
'requests', |
118 | 118 |
'sorl-thumbnail', |
119 |
- |