Coder Social home page Coder Social logo

danwild / react-webpack-django Goto Github PK

View Code? Open in Web Editor NEW
30.0 3.0 11.0 280 KB

De-coupled ReactJS client for greater flexibility and less black-box Django magic

License: MIT License

JavaScript 49.90% Python 45.65% HTML 2.25% CSS 2.20%
django webpack react webpack-bundle reactjs

react-webpack-django's Introduction

react-webpack-django

Full-stack application scaffold. Structured to provide much needed decoupling between the client application build and Django's opinionated pipeline/staticfiles systems.

Achieved by using webpack to manage our client bundling, with these tools:

In short, we'll let Django do what it is good at; Server-side/ORM stuff, while de-coupling the client for greater flexibility (and less confusing black-box Django magic!)

routing notes

  • Routing (e.g. /, /about) has been configured using react-router-dom.
  • In our Django apps urls.py we have defined a catchall which essentially defers routing to React.
  • There is also an example url configured to allow django to serve a route template (depending on your use case you may want a mix of both approaches).

styling

todo

  • Client/Server request auth.

install, build, run etc.

From project root:

# javascript things
npm install                         # install js packages
npm run watch                       # run webpack build for client app, and rebuild on \*change

# python things
virtualenv venv                     # create python virtualenv
source venv/bin/activate            # enter venv
pip install -r requirements.txt     # install pip packages
python manage.py runserver          # serve

*to just build a webpack bundle once use: npm run build

License

MIT License

Resources

Heavily based on these great resources:

react-webpack-django's People

Contributors

danwild avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.