react-plus-django

1.0.2 • Public • Published

react-plus-django

An npm package to integrate react in a Django project with one command.

GitHub: https://github.com/hmzaerrechydy/react-plus-django

Install

In the terminal go to your Django project directory and type:

npm i react-plus-django

Manual work

After installing the package you have to do the following:

  1. Add frontend into installed apps, this package will add a new app into your project so you need to add it to your installed apps in settings.py.
  2. In the container of your project (the folder that contains settings.py) add the following path to the file urls.py inside urlpatterns and don't forget to import include:
# your file by default imports path, add a comma and add include like this: 
from django.urls import path, include

urlpatterns = [
    path('admin/', admin.site.urls),
# here is the line you need to add inside urlpatterns:
    path('', include('frontend.urls'))
]
  1. Finally don't forget to run webpack, in the terminal go to the folder frontend, and run the following command:
npm run dev

Dependencies (0)

    Dev Dependencies (0)

      Package Sidebar

      Install

      npm i react-plus-django

      Weekly Downloads

      41

      Version

      1.0.2

      License

      ISC

      Unpacked Size

      40.9 MB

      Total Files

      5123

      Last publish

      Collaborators

      • hmzaerrechydy