react-render-client
Advanced tools
+34
-0
| Changelog | ||
| ========= | ||
| ### 0.12.5 | ||
| - Support manifest staticfiles storage classes by resolving the hashed name of files. | ||
| ie. `js/hello.js` to `js/hello.d0bf07ff5f07.js`. | ||
| *NOTE: Only the python code changed in this release* | ||
| ### 0.12.4 | ||
| - Allow binding to other interfaces | ||
| *NOTE: Only JS changed in this release* | ||
| ### 0.12.3 | ||
| - Add a directory whitelist option to restrict where the service can load from | ||
| Can be set by either CLI switch: `--whitelist /some/path` | ||
| Or by environment variable: `REACT_WHITELIST=/some/path react-service` | ||
| *NOTE: Only JS changed in this release* | ||
| ### 0.12.2 | ||
| - Larger request limit for react-render-service | ||
| *NOTE: Only JS changed in this release* | ||
| ### 0.12.1 | ||
| - Allow ES6 style React components | ||
| *NOTE: Only JS changed in this release* | ||
| ### 0.12.0 | ||
@@ -5,0 +39,0 @@ |
+2
-2
| Metadata-Version: 1.1 | ||
| Name: react-render-client | ||
| Version: 0.12.0 | ||
| Version: 0.12.5 | ||
| Summary: Render and bundle React components from a Django application | ||
@@ -9,3 +9,3 @@ Home-page: https://github.com/mic159/react-render | ||
| License: MIT | ||
| Download-URL: https://github.com/mic159/react-render/tarball/0.12.0 | ||
| Download-URL: https://github.com/mic159/react-render/tarball/0.12.5 | ||
| Description: Documentation at https://github.com/mic159/react-render | ||
@@ -12,0 +12,0 @@ Keywords: react,reactjs,django,isomorphic,templates |
| Metadata-Version: 1.1 | ||
| Name: react-render-client | ||
| Version: 0.12.0 | ||
| Version: 0.12.5 | ||
| Summary: Render and bundle React components from a Django application | ||
@@ -9,3 +9,3 @@ Home-page: https://github.com/mic159/react-render | ||
| License: MIT | ||
| Download-URL: https://github.com/mic159/react-render/tarball/0.12.0 | ||
| Download-URL: https://github.com/mic159/react-render/tarball/0.12.5 | ||
| Description: Documentation at https://github.com/mic159/react-render | ||
@@ -12,0 +12,0 @@ Keywords: react,reactjs,django,isomorphic,templates |
@@ -5,2 +5,3 @@ from __future__ import absolute_import | ||
| import logging | ||
| from django.contrib.staticfiles.storage import staticfiles_storage, HashedFilesMixin | ||
| from django.contrib.staticfiles.finders import find as find_static | ||
@@ -40,2 +41,11 @@ from django.core.serializers.json import DjangoJSONEncoder | ||
| if not os.path.isabs(path_to_source): | ||
| # If its using the manifest staticfiles storage, to the hashed name. | ||
| # eg. js/hello.js -> js/hello.d0bf07ff5f07.js | ||
| if isinstance(staticfiles_storage, HashedFilesMixin): | ||
| try: | ||
| path_to_source = staticfiles_storage.stored_name(path_to_source) | ||
| except ValueError: | ||
| # Couldn't find it. | ||
| pass | ||
| # Now resolve it to the absolute path using the finders | ||
| path_to_source = find_static(path_to_source) or path_to_source | ||
@@ -42,0 +52,0 @@ |
+11
-0
@@ -37,2 +37,3 @@ React Render | ||
| - [Running the tests](#running-the-tests) | ||
| - [react-service settings](#react-service-settings) | ||
@@ -108,3 +109,13 @@ Installation | ||
| react-service settings | ||
| ---------------- | ||
| - `--host` Bind to a different interface, by default this is localhost. | ||
| - `--port` Bind to a different port. By default it is `63578` | ||
| - `--watch` Enable developer mode where it will automatically re-load the bundles if they change. | ||
| - `--whitelist` Restrict the directory that the service can access. | ||
| By default, the service will attempt to load any arbitrary path it is given. | ||
| Can also be set via the `REACT_WHITELIST` environment variable. | ||
| Running the tests | ||
@@ -111,0 +122,0 @@ ----------------- |
+1
-1
| from setuptools import setup, find_packages | ||
| VERSION = '0.12.0' | ||
| VERSION = '0.12.5' | ||
@@ -5,0 +5,0 @@ setup( |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
12610
16.86%105
10.53%