r/django • u/AsSimple • May 25 '20
Combining Django & React (open-source) https://knboard.com/
2
12
u/AlenEviLL May 25 '20
This is amazing and just what I have been looking for. I started learning JS and React and was looking for examples on how to implement it with Django. Thank you very much!
6
u/Sjnao May 25 '20
I m trying something similar, and now I see yours I feel really demotivated, it looks so clean like mine will never been. How much time did you invested onto this if I might ask.?
11
u/334578theo May 26 '20
if you're struggling to with the UI then use a UI library, it will make your life so much easier - personal favourite at the moment is UIKit
1
u/nityananda Jun 01 '20
I was searching for some good example of React with Django and your is amazing.
Are you planning to use also social login/signup through Django Allauth? That would make it even better.
1
u/AsSimple Jun 01 '20
Hey, django-allauth is actually already used in the background so adding social login/signup should actually be quite easy. It sounds like a great improvement, but which ones should be used? Github, Google, FB?
Feel free to create an issue/open a pull request if you want to contribute.
1
u/nityananda Jun 01 '20
Github, Google and FB sounds good.
I would love to contribute this, but I am completely new into React so I don't know how yet.
1
u/MedAziz11 Sep 06 '20
Can i know what u used to create that dialogue task with the text editor amd all the other features of it?
2
u/AsSimple Sep 06 '20
Hey, I used `react-markdown-editor-lite`. There are many different options to choose from like `Draft-js`, `react-mde`. Just need to try them out and see which one fits your needs.
Implementation here: https://github.com/rrebase/knboard/blob/master/frontend/src/features/task/EditTaskDialog.tsx#L393
1
3
3
u/mattsb May 25 '20
I made a script to build this type of setup, including JWT login. Check it out!
1
u/slenderman878 May 27 '20
Thanks for the easy to use setup! I was wondering if you could elaborate a little bit on what you mean with "Map a static path /app/ to the build folder. /app/build/".
2
2
u/Teilchen May 28 '20
Awesome! Trello execs hate this trick.
Ever tried Vue β any thoughts on coupling it with Django? Heard it's a lot less complex
3
1
1
1
1
u/wishicouldcode May 26 '20
Thank you, this looks great. I have cloned and started poking around, looking forward to the blog series.
1
1
1
1
0
u/throwitofftheboat May 25 '20
Can someone point me in the direction of these Django GUI Apps? Can you edit models and views with them?
0
39
u/AsSimple May 25 '20
Github: https://github.com/rrebase/knboard
Here's an actual real-world example of a recommended approach when combining Django & React.
Django REST framework is used to serve the API for the React app, which is bundled into static files, served by Nginx. See the docker files & nginx.conf for the actual configuration.