Skip to main content

use create react app 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

Install

pip install django-create-react-app

  1. Add "create_react_app" to your INSTALLED_APPS setting like this::
    INSTALLED_APPS = [
        ...
        'create_react_app',
    ]

  1. Add create react app configuration into your settings::
    CREATE_REACT_APP = {
        'DEFAULT': {
            'BUNDLE_DIR_NAME': '<path to bundle folder>',
            'FRONT_END_SERVER': "http://localhost:3000/",
            'is_dev': False,
        }
    }
  1. Use it in your templates ::
{% load react_bundle_loader %}

<html>
  <head>
    {% render_bundle_css  %}
  </head>
  <body>
    ....
     {% render_bundle_js %}
  </body>
</head>
    

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.4.tar.gz (4.1 kB view details)

Uploaded Source

File details

Details for the file django-create-react-app-0.4.tar.gz.

File metadata

  • Download URL: django-create-react-app-0.4.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.7.4

File hashes

Hashes for django-create-react-app-0.4.tar.gz
Algorithm Hash digest
SHA256 63ba3f69f0c7feca4b5d4f8baef1b4490e92abb6cbafccbf9457736621cba9fb
MD5 6b1a25895a353734192e83b3cdc30ad9
BLAKE2b-256 2f8f1a84e63989b6403b7787aa7f20a9d54faaccb65d9b19efe9c4e582aacd12

See more details on using hashes here.

Provenance

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