@@ -54,7 +54,7 @@ REACT_BUILD_DIRECTORY = os.path.join(BASE_DIR, 'app', 'react', 'build')
5454 'DEFAULT': {
5555 'BUNDLE_DIR_NAME': REACT_BUILD_DIRECTORY,
5656 'FRONT_END_SERVER': "http://localhost:3000/",
57- 'is_dev ': False,
57+ 'IS_DEV ': False,
5858 }
5959 }
6060```
@@ -93,20 +93,25 @@ STATICFILES_DIRS = (
9393
9494CREATE_REACT_APP = {
9595 'DEFAULT': {
96- 'BUNDLE_DIR_NAME': CLIENT_FRONTEND_BUILD ,
96+ 'BUNDLE_DIR_NAME': REACT_BUILD ,
9797 'FRONT_END_SERVER': "http://localhost:3000/",
98- 'is_dev': True,
99- },
98+ 'IS_DEV': False,
99+ "PUBLIC_PATH_DEV": "http://localhost:3000/",
100+ "PUBLIC_PATH": "/static/"
101+ }
100102 'ADMIN': {
101- 'BUNDLE_DIR_NAME': ADMIN_FRONTEND_BUILD ,
102- 'FRONT_END_SERVER': "http://localhost:3001 /",
103- 'is_dev ': True ,
103+ 'BUNDLE_DIR_NAME': REACT_BUILD ,
104+ 'FRONT_END_SERVER': "http://localhost:3000 /",
105+ 'IS_DEV ': False ,
104106 },
105107}
106108
107109
108110```
109111
112+
113+
114+
110115### Rendering react admin app inside templates ::
111116```
112117{% load react_bundle_loader %}
@@ -122,3 +127,37 @@ CREATE_REACT_APP = {
122127</head>
123128
124129```
130+
131+
132+ ### Using Preloading ::
133+ The is_preload=True option in the render_bundle_css or render_bundle_js template tag can be used to add rel="preload" link tags.
134+ ```
135+ {% render_bundle_css is_preload=True %}
136+
137+ ```
138+
139+ ### Add attributes
140+ add some extra attributes to the tag
141+ ```
142+ {% render_bundle_js attrib="async" %}
143+
144+ {% render_bundle_js attrib="disabled" %}
145+ ```
146+
147+
148+ ### migration from 0.8.4 to 0.9
149+ "is_dev" changed to "IS_DEV"
150+ is_dev in lowercase will not work
151+
152+
153+ ### docker support
154+ PUBLIC_PATH_DEV default value will be FRONT_END_SERVER, which will be used for incase of docker
155+
156+ PUBLIC_PATH_DEV will be used in case of docker to http://localhost:3000/
157+ FRONT_END_SERVER: host.docker.internal
158+
159+ ### django storage support
160+
161+ change PUBLIC_PATH to storagepath e.g
162+
163+ PUBLIC_PATH:"https://234234234.aws.com/static/ "
0 commit comments