Settings

Theme

Django React Redux JWT Base Project

github.com

38 points by lfrodrigues 10 years ago · 27 comments

Reader

jonesetc 10 years ago

Note: JWT is JSON Web Token in this case, not Java Web Toolkit. This was very confusing to me as JWT is only mentioned in the title but not anywhere else in the README.

gitaarik 10 years ago

Not sure why the `accounts` app is included [0]. As seen from the comments [1] in the `models.py` it looks like it's from an existing project, don't think this should be in a boilerplate project.

Nevertheless, nice boilerplate project :).

[0] https://github.com/Seedstars/django-react-redux-jwt-base/tre...

[1] https://github.com/Seedstars/django-react-redux-jwt-base/blo...

sawyerjhood 10 years ago

Very niche, but if you need it this could definitely save you a few hours. I wish I had this last weekend for a hackathon where I used a stack very similar to this. I spent longer than I should have to get webpack up and running with Django.

  • mrdrozdov 10 years ago

    Silly question, but can't you run Django to serve your backend API, and Webpack to serve your static assets including javascript, then use an http proxy like Nginx to serve them under the same url?

    • d215 10 years ago

      well for development that's a good idea. For production you don't want to have webpack serving anything, you want it compiled, right?

      • gitaarik 10 years ago

        That's what I do. Webpack compiles to the static/ dir and Django serves the static files in that dir. I don't know how/why you would do it otherwise.

        • withjive 10 years ago

          For fast development iterations, running webpack's own web server is used for development.

          Where django would instead load a custom JS endpoint in development, and use the compiled file for production.

          Webpack static compile each time is just way to slow— I've seen it take 60+seconds to compile.

kev009 10 years ago

This sounds horrifying, less is more.

  • robertfw 10 years ago

    Make things as simple as possible, but no simpler

    For real world projects you end up needing a fair bit of stuff. I'm using a pretty similar stack and once you are up and running the majority of it falls into the background and your day to day work generally involves working only with an easy to use top layer.

  • andybak 10 years ago

    Excellent. I look forward to seeing your assembly language web framework.

    Joking aside - I'm actually going to call you out on a throwaway, crown-pleasing comment. You'd please the crowd a lot less if you added more detail as everyone would suddenly discover their sweet spot in the 'roll your own vs re-use' wars didn't coincide with yours.

    It's a little like standing on a soap box and shouting "freedom!". Everyone can get behind a content-free message.

  • elcapitan 10 years ago

    At first glance I thought it was a parody and looked if both Angular and React were included.

tom_usher 10 years ago

Great work, I've been enjoying using this exact stack recently - this has definitely taught me a few things.

The main thing I'm still trying to get my head round with React/Redux/Router is where in the lifecycle to do data fetching - I noticed you're doing it in componentWillMount, when the React docs suggest componentDidMount, and I've seen others do it in various other ways with no clear indication what the 'best practice' approach is.

  • pergomes 10 years ago

    I understand your thoughts and normally we follow the React docs suggestions for generic components. We place data fetching code in componentWillMount in those cases we want to win some time, but if it's not the case I would recommend to place it in componentDidMount as React docs suggests.

hiphipjorge 10 years ago

What would be the best way to include some form of web sockets server/realtime pub-sub into this á la Socket.io? What's the best way to do this in Django? I feel this is an important component of any new modern web project, but it seems to be ignored here.

chiliap2 10 years ago

Does this render all the React content server-side first? I wasn't able to figure out from an initial glance through the files.

memonkey 10 years ago

You could put all of this into Vagrant or Otto with a bash file to set up the dependencies to get it going.

jdimov9 10 years ago

Ugh! Blah. Spit.

  • andybak 10 years ago

    Which particular religious faction involved in this are you railing against?

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection