Skip to main content

Transparently use webpack with django

Project description

===== django-create-react-app

This app is a Django app that helps to integrating the integrate the React that has been added in your Project through create React App

Detailed documentation is in the "docs" directory.

Quick start

  1. Add "polls" to your INSTALLED_APPS setting like this::

    INSTALLED_APPS = [ ... 'django-create-react-app', ]

  2. Add create react app configuration into your settings::

    CREATE_REACT_APP = { 'DEFAULT': { 'CACHE': True, 'BUNDLE_DIR_NAME': '/Users/aamirbhatt/workspace/hack_django_react/dashboard/static', 'LOADER_CLASS': 'create_react_app.loader.CreateReactLoader', 'FRONT_END_SERVER': "http://localhost:3000/", 'is_dev': False, } }

  3. Use it in your templates :: {% load react_bundle_loader %}

    add this tag in the html head {% render_bundle_css %}

    add this tag in the html body {% render_bundle_js %}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-create-react-app-0.1.tar.gz (4.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page