Menu

Tree [f63710] main /
 History

HTTPS access


File Date Author Commit
 .github 2021-10-26 Jiten Sidhpura Jiten Sidhpura [f63710] Added CodeCov Token
 assets 2021-10-21 Jiten Sidhpura Jiten Sidhpura [1a3e25] Changed devDependencies to Dependencies in assets
 django_webpack_dev_server 2021-10-22 Jiten Sidhpura Jiten Sidhpura [6f2698] Modified command success message
 requirements 2021-10-25 Jiten Sidhpura Jiten Sidhpura [7e2e89] Added requirements directory
 tests 2021-10-20 Jiten Sidhpura Jiten Sidhpura [de1205] Added test with the production environment vari...
 .coveragerc 2021-10-14 Jiten Sidhpura Jiten Sidhpura [12463f] Fixed issue in py3.6.5. Added Tests
 .gitignore 2021-10-14 Jiten Sidhpura Jiten Sidhpura [12463f] Fixed issue in py3.6.5. Added Tests
 .pre-commit-config.yaml 2021-10-25 Jiten Sidhpura Jiten Sidhpura [7e2e89] Added requirements directory
 LICENSE 2021-08-24 Jiten Sidhpura Jiten Sidhpura [9f4255] Initial commit
 MANIFEST 2021-08-25 Jiten Sidhpura Jiten Sidhpura [674bd7] Removed old package and modified the readme.rst...
 README.md 2021-10-25 Jiten Sidhpura Jiten Sidhpura [7e2e89] Added requirements directory
 pytest.ini 2021-10-14 Jiten Sidhpura Jiten Sidhpura [12463f] Fixed issue in py3.6.5. Added Tests
 requirements.txt 2021-10-25 Jiten Sidhpura Jiten Sidhpura [7e2e89] Added requirements directory
 runtests.py 2021-10-14 Jiten Sidhpura Jiten Sidhpura [12463f] Fixed issue in py3.6.5. Added Tests
 setup.cfg 2021-09-30 Jiten Sidhpura Jiten Sidhpura [756069] Used black code formatter to style the code
 setup.py 2021-10-22 Jiten Sidhpura Jiten Sidhpura [b33c04] Modified success message after setup is complete
 tox.ini 2021-10-19 Jiten Sidhpura Jiten Sidhpura [6a9266] Added Pre Commit Hooks

Read Me

django-webpack-dev-server

PyPI version
codecov
Requirements Status
CI
pre-commit.ci status
Code style: black
License MIT

Django Webpack Dev Server is a command line Django reusable app to setup configuration files for React. It uses webpack and webpack_dev_server to bundle your frontend code.

Installation

Install using pip

pip install django-webpack-dev-server

Package Supports

  1. React (Javascript)
  2. React (Typescript)

Quick start

  1. Add 'django_webpack_dev_server' to your INSTALLED_APPS in
    settings.py like this:

    python INSTALLED_APPS = [ ... 'django_webpack_dev_server', ]

  2. Default django app name is frontend and template is javascript. You can provide your name and template by running
    python manage.py generate react --app_name your_app_name --template (javascript/typescript)

  3. Run python manage.py generate react to create a django app with the default app_name and template.

  4. Add the new django app to your INSTALLED_APPS setting like in step 1.

  5. Add the path for the new django app in the urlpatterns of the project's urls.py like this:

    ```python
    from django.urls import path, include

    path("", include("your_app_name.urls")),
    ```

  6. Run python manage.py runserver to start the django's development
    server.

  7. cd into the newly created django app and run npm start and go to
    (http://localhost:8080/).

  8. Run npm run build to create a production build of your frontend code.

  1. Demo Video of the Package

  2. Check out Tech with Tim's Youtube Playlist for a detailed explanation in building Django and React Full Stack App.

  3. Webpack Documentation

Contributions

If you find an issue or have a new feature then feel free to make a Pull Request. Your Contributions are always welcomed.

Running the Package in Development Mode

  1. You can run the package in development mode by setting the "SOFTWARE_ENVIRONMENT_MODE" environment variable equal to "development".

  2. Now you can load assets from your local system and the new changes can be tested.

License

This project is provided under the MIT License.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.