Skip to content

Commit

Permalink
Merge pull request #5786 from uktrade/feature/TET-878-drf-bootstrap-3…
Browse files Browse the repository at this point in the history
…-replacement

Add package drf-redesign which styles the rest framework browsable API
  • Loading branch information
DeanElliott96 authored Nov 15, 2024
2 parents 8b331fd + ecd458a commit 0c77cbe
Show file tree
Hide file tree
Showing 22 changed files with 3,946 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ job_defaults: &job_defaults

- run:
name: Run collectstatic
command: python manage.py collectstatic --noinput
command: python manage.py collectstatic --noinput --ignore rest_framework/css/* --ignore rest_framework/js/bootstrap.min.js --ignore rest_framework/js/prettify-min.js --ignore rest_framework/js/default.js

- run:
name: Run tests
Expand Down
2 changes: 1 addition & 1 deletion .copilot/image_build_run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,4 @@ export ES_APM_SERVER_URL="http://localhost:8200"
export ES_APM_ENVIRONMENT="circleci"
export REDIS_BASE_URL="redis://localhost:6379"

python manage.py collectstatic --noinput
python manage.py collectstatic --noinput --ignore rest_framework/css/* --ignore rest_framework/js/bootstrap.min.js --ignore rest_framework/js/prettify-min.js --ignore rest_framework/js/default.js
2 changes: 2 additions & 0 deletions config/settings/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@

THIRD_PARTY_APPS = [
*_ES_APM_APP,
'datahub.drf_browsable_api', # not third party but must be before drf_redesign
'drf_redesign', # must be before rest_framework
'rest_framework',
'django_extensions',
'reversion',
Expand Down
Empty file.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

2,078 changes: 2,078 additions & 0 deletions datahub/drf_browsable_api/static/drf_browsable_api/fonts/bootstrap-icons.css

Large diffs are not rendered by default.

Binary file not shown.
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

1,213 changes: 1,213 additions & 0 deletions datahub/drf_browsable_api/static/drf_browsable_api/js/highlight.min.js

Large diffs are not rendered by default.

14 changes: 14 additions & 0 deletions datahub/drf_browsable_api/static/drf_browsable_api/js/http.min.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*! `http` grammar compiled for Highlight.js 11.9.0 */
(()=>{var e=(()=>{"use strict";return e=>{const n="HTTP/([32]|1\\.[01])",a={
className:"attribute",
begin:e.regex.concat("^",/[A-Za-z][A-Za-z0-9-]*/,"(?=\\:\\s)"),starts:{
contains:[{className:"punctuation",begin:/: /,relevance:0,starts:{end:"$",
relevance:0}}]}},s=[a,{begin:"\\n\\n",starts:{subLanguage:[],endsWithParent:!0}
}];return{name:"HTTP",aliases:["https"],illegal:/\S/,contains:[{
begin:"^(?="+n+" \\d{3})",end:/$/,contains:[{className:"meta",begin:n},{
className:"number",begin:"\\b\\d{3}\\b"}],starts:{end:/\b\B/,illegal:/\S/,
contains:s}},{begin:"(?=^[A-Z]+ (.*?) "+n+"$)",end:/$/,contains:[{
className:"string",begin:" ",end:" ",excludeBegin:!0,excludeEnd:!0},{
className:"meta",begin:n},{className:"keyword",begin:"[A-Z]+"}],starts:{
end:/\b\B/,illegal:/\S/,contains:s}},e.inherit(a,{relevance:0})]}}})()
;hljs.registerLanguage("http",e)})();
Loading

0 comments on commit 0c77cbe

Please sign in to comment.