forked from markfinger/python-react
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsettings.py
More file actions
48 lines (38 loc) · 1.33 KB
/
Copy pathsettings.py
File metadata and controls
48 lines (38 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
import os
TEST_ROOT = os.path.dirname(__file__)
COMPONENT_ROOT = os.path.join(TEST_ROOT, 'components')
SECRET_KEY = '_'
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(TEST_ROOT, 'static')
INSTALLED_APPS = (
'django.contrib.staticfiles',
'js_host',
'webpack',
'react',
'tests.django_test_app',
)
STATICFILES_FINDERS = (
# Defaults
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
# Webpack finder
'webpack.django_integration.WebpackFinder',
)
JS_HOST = {
'SOURCE_ROOT': TEST_ROOT,
# Let the manager spin up an instance
'USE_MANAGER': True,
}
WEBPACK = {
'BUNDLE_ROOT': STATIC_ROOT,
'BUNDLE_URL': '/static/',
}
class Components(object):
HELLO_WORLD_JS = os.path.join(COMPONENT_ROOT, 'HelloWorld.js')
HELLO_WORLD_JSX = os.path.join(COMPONENT_ROOT, 'HelloWorld.jsx')
REACT_ADDONS = os.path.join(COMPONENT_ROOT, 'ReactAddonsComponent.jsx')
DJANGO_REL_PATH = 'django_test_app/StaticFileFinderComponent.jsx'
PERF_TEST = os.path.join(COMPONENT_ROOT, 'PerfTestComponent.jsx')
HELLO_WORLD_JSX_WRAPPER = os.path.join(COMPONENT_ROOT, 'HelloWorldWrapper.jsx')
ERROR_THROWING = os.path.join(COMPONENT_ROOT, 'ErrorThrowingComponent.jsx')
SYNTAX_ERROR = os.path.join(COMPONENT_ROOT, 'SyntaxErrorComponent.jsx')