Basic reactjs support.

This commit is contained in:
Drew Larson
2016-06-01 18:11:07 -06:00
parent af1130de04
commit ad0ad4eac8
10 changed files with 153 additions and 22 deletions
+15 -1
View File
@@ -29,7 +29,10 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'webpack_loader',
'compressor',
'registration',
'core',
]
@@ -120,6 +123,7 @@ STATICFILES_FINDERS = (
)
STATICFILES_DIRS = [
('vendor', os.path.join(BASE_DIR, '../vendor')),
os.path.join(BASE_DIR, '../assets')
]
STATIC_ROOT = 'static'
STATIC_URL = '/static/'
@@ -128,4 +132,14 @@ AUTH_USER_MODEL = 'registration.Member'
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'django_libsass.SassCompiler'),
)
)
WEBPACK_LOADER = {
'DEFAULT': {
'CACHE': False,
'BUNDLE_DIR_NAME': 'bundles/', # must end with slash
'STATS_FILE': os.path.join(BASE_DIR, '../webpack-stats.json'),
'POLL_INTERVAL': 0.1,
'IGNORE': ['.+\.hot-update.js', '.+\.map']
}
}
@@ -53,4 +53,4 @@ INSTALLED_APPS += [
# Don't worry about IP addresses, just show the toolbar.
DEBUG_TOOLBAR_CONFIG = {
'SHOW_TOOLBAR_CALLBACK': lambda *args: True
}
}