dact
dact is a CLI Package in Python focusing towards decreasing development setup time while working with React + Django Full Stack Development. dact setup the whole, ready to work, Django project with React in just a single line command. It handles all the urls, views, webpack, loaders, babel,etc. for the user in just a single command. Using dact, a developer can start writing their React code and see it render on their Django Web App.
GeeksForGeeks Article - https://www.geeksforgeeks.org/djangoreact-full-stack-development-setup-using-dact/
Installing dact
pip install dact
Django + React
-
Start a Django Project with default Frontend app name
dact myproject -
Start Django Project with custom Frontend app name
dact myproject appname
Requirements
- You must have npm installed in your system.
- You must have Python installed in your system.
- Python and pip or pip3 must be added to your environment.
How to install this Package(for Development)
- Clone this Repo
cd dactpip3 install -e .
On successfull setup of your project, you should see something like this:
How to work with dact
To start the Server
cd myproject
python manage.py runserver
To start working on the frontend
-
Start watching the changes using
dact-watchLetdact-watchrun in a different terminal. Make sure you rundact-watchin the same directory asmanage.py. -
Edit your React Front-end at :
reactfrontend > static > src > App.js -
Make your changes and save your file.
-
Refresh your page.
Release files for dact 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dact-1.3.0.tar.gz | 9.4 kB | Details |
Release files / dact-1.3.0.tar.gz
| Download URL | dact-1.3.0.tar.gz |
|---|---|
| Size | 9.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8057808a6ce675006751d39016956ed3c87ed4b5c828a45e9dd5e46a2db74aca
|
|
BLAKE2b-256 checksum How to use checksums |
b295f980ca2d4ccab23821dd8400317880f071d4ebcf28139fb63bdadb01942e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/4.6.1 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.10
|