File tree 6 files changed +20
-4
lines changed
lib/workload/stateless/stacks
sequence-run-manager/sequence_run_manager
workflow-manager/workflow_manager
skel/django-api/project_name
6 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 6
6
7
7
8
8
class PaginationConstant (ABC ):
9
- ROWS_PER_PAGE = "rowsPerPage "
9
+ ROWS_PER_PAGE = "rows_per_page "
10
10
PAGE = "page"
11
11
COUNT = "count"
12
12
Original file line number Diff line number Diff line change 44
44
"django.contrib.messages.middleware.MessageMiddleware" ,
45
45
"django.middleware.clickjacking.XFrameOptionsMiddleware" ,
46
46
'simple_history.middleware.HistoryRequestMiddleware' ,
47
+ "djangorestframework_camel_case.middleware.CamelCaseMiddleWare" ,
47
48
]
48
49
49
50
ROOT_URLCONF = "app.urls.base"
131
132
REST_FRAMEWORK = {
132
133
"DEFAULT_PAGINATION_CLASS" : "rest_framework.pagination.PageNumberPagination" ,
133
134
"PAGE_SIZE" : 10 ,
135
+ # https://www.django-rest-framework.org/api-guide/parsers/#camelcase-json
136
+ # https://github.com/vbabiy/djangorestframework-camel-case
137
+ "DEFAULT_RENDERER_CLASSES" : (
138
+ "djangorestframework_camel_case.render.CamelCaseJSONRenderer" ,
139
+ "djangorestframework_camel_case.render.CamelCaseBrowsableAPIRenderer" ,
140
+ ),
141
+ "DEFAULT_PARSER_CLASSES" : (
142
+ "djangorestframework_camel_case.parser.CamelCaseFormParser" ,
143
+ "djangorestframework_camel_case.parser.CamelCaseMultiPartParser" ,
144
+ "djangorestframework_camel_case.parser.CamelCaseJSONParser" ,
145
+ ),
146
+ "JSON_UNDERSCOREIZE" : {
147
+ 'no_underscore_before_number' : True ,
148
+ },
134
149
}
135
150
136
151
CORS_ORIGIN_ALLOW_ALL = True
Original file line number Diff line number Diff line change 3
3
4
4
aws-xray-sdk # intentionally leave out version, the daily release of this dep is ok
5
5
djangorestframework==3.15.2
6
+ djangorestframework-camel-case==1.4.2
6
7
Django==5.1
7
8
django-cors-headers==4.4.0
8
9
django-environ==0.11.2
Original file line number Diff line number Diff line change 6
6
7
7
8
8
class PaginationConstant (ABC ):
9
- ROWS_PER_PAGE = "rowsPerPage "
9
+ ROWS_PER_PAGE = "rows_per_page "
10
10
PAGE = "page"
11
11
COUNT = "count"
12
12
Original file line number Diff line number Diff line change 6
6
7
7
8
8
class PaginationConstant (ABC ):
9
- ROWS_PER_PAGE = "rowsPerPage "
9
+ ROWS_PER_PAGE = "rows_per_page "
10
10
PAGE = "page"
11
11
COUNT = "count"
12
12
Original file line number Diff line number Diff line change 6
6
7
7
8
8
class PaginationConstant (ABC ):
9
- ROWS_PER_PAGE = "rowsPerPage "
9
+ ROWS_PER_PAGE = "rows_per_page "
10
10
PAGE = "page"
11
11
COUNT = "count"
12
12
You can’t perform that action at this time.
0 commit comments