React + Django Integration Tutorial | Hello World App
ฝัง
- เผยแพร่เมื่อ 5 ก.ย. 2024
- Check out my Complete Django course! dub.sh/NvGboTI
Check out my React Crash course on Udemy: www.udemy.com/...
Simple React/Django integration with a hello world app.
Follow me on Twitter: / dennisivy11
LinkedIn: / dennis-ivanov
Source Code: github.com/div...
Don't forget to check out my Complete Django course! dub.sh/NvGboTI
genius that you made a very short tutorial to just show of the technical part. the other tutorials are hours long i just need to understand the basic connection
thanks
Bro Can I make a full stack website using React + Django ??And is it easy to integrate all things properly?
@@devendraingale2870 if you know react and django with this you can make everything you need to do work properly
I been done watched hours... hours!! of Django/React integration tutorials sending me around the bend installing babel and writing a hundred things in settings.py and my man has us set up in 2 min flat. Bing. Bang. Bosh. What a champ.
Dennis this is awesome thank you. Straight to the point of what was needed. I follow you. More context on react + django is always appreciated
I am searching this from one month. Probably the simplest way to combine django and react.
Dennis. please start new series with project from scratch react + django tutorials. happy to following your tutorials . thank you
I'm gonna release a django + react ToDo app based off this video but once I'm done with my series and a few other projects I'll probably put together a full course on this topic, or atleast some practical apps that with react + django. Thank you for your support :)
Dennis Ivy thank you so much for all your videos they are great! Will you also include how to deploy the app to Heroku? That would be an amazing addition!
@@DennisIvy iam egerrly waiting
@@DennisIvy plze pu
This is very fast and a bullet to the heart explanation of what I searched for, Thank you!
Short and to the point. Amazing! It's everything I wanted.
Your videos are very clear and "to the point". Massive respect man. Thanks a lot. Subscribed!
Thanks a lot ❤❤
After wasting 2 days ..finally found your video .
If anyone facing problem on reloading url in app plz use re_path instead of just path
and place it at last in urlpatterns.
re_path(r"^.*", TemplateView.as_view(template_name = "index.html"))
I never knew that. You made it so easy. Absolute gold and thank you for the tutorial
Sir i'm a cse student and have been Working with django from last 2 years . More pumped after seeing your Videos.
Thank you so much. This was the part that was messing me up so much. I prefer tutorials that go straight to the point.
My new go-to channel. Waiting for a Django-react app with payment integration. Don't say I asked for too much. Weldone and good job.
I'm honored :) thank you for your input. I love hearing what content you guys would like to see from me.
i did that with Paypal ! easy peasy, the only issue you'll face is integrating the request body for paypal.
@@djangodo7015 the most widely used in my country (Nigeria) is paystack. I still find it difficult to integrate it with Django.
Took me a whole day... then I found this video. Thank you !!
Hi Dennis, I'm Julián, from Colombia, South America. I like your content. This is video is short but so important. Thanks a lot for share it.
I am starting to like the way you explain in shortest time possible.
Hi,
Thanks for this short video but it is a great one :)
Can't wait for the next ones ...
Please upload them asap ..
BR,
I am Nyoman, from Bali, Indonesia
Hi Nyoman and Thank you :) Putting together the next React + Django video soon!
Why not you had born before! I tried hard another option and that is not good except yours. Many many thanks for share an easy tutorial.
Your very welcome :)
Dude I started watching your tutorials today but your my number one so far.
Thanks for to-do app series and this integration ! Looking forward to see real app clone using react-django (If it's paid one also I am ready blindly!). Finally I can say , I found someone to follow for many years to come. Thanks !
it drove me nuts when figuring out how the heck do we deploy django + react since both, during development, are running on different server. I finally understood react & now I understand that Django are the real main thing we actually deploy !
soo both are running on different server you know why? :o How can you deploy both then in an android apk for example, do you know?
In my system manifest.json file not found error is coming
I have the same problem, do you have any idea how this can be solved ?
@@TripleIsaac no still not found any solution
same problem
Same issue... Please give a solution
The guy in the vid also gets the error, but doesn't address it
A video on how to dockerize this application will be really helpful
quick simple and clear show on how it work. thanks
Really Thanks Dennis for that video just in 11 minutes you showed that big confusing thing....
congrats for your 100k subs🔥🔥🔥 i think you should make another tutorial about django and react. and make some practical app from scratch. im waiting dennis 🤘🤘
Thanks .. pls upload more videos on django + react
Will do :) gonna do a full course on react in the near future.
@@DennisIvy Thanks Dennis, but is the django tutorial finished ?
Are you going to continue him or make a pause ?
@@DennisIvy We just follow you everything for skill up web dev.
You are the best!! I was searching for the latest version videos and your channel popped up!!!! Thanks man...
Ciao bella :)
This tutorial was a lifesaver!
How did it actually save your life ?
@@animeshsingh4290 This was 9 months ago but I imagine I was moments away from wading into the sea and disappearing forever.
but in all seriousness, I was struggling with connecting Django to React and this tutorial saved the day
Short and good video thanks ! but i have a question: in reality we should build a REST API with django for exemple and a react APP than we can fetch the api from React right ? like i don't understand the purpose of integrating React app inside django app like that, like we could simply build all the app with django at this point no ? because we don't really have a separate backend and front-end because we are running everything from Django ! i'm new so maybe i'm completely wrong but i want to understand if you can help
one of the best teacher i love the way you explain
Truly just love how we see almost no JS yet can do all what JS does. I just cannot stand JS. Although I do like it here and there and really like node, something about Django and flask and python make web dev so much “easier” I’m literally going to watch your Django series and then the portfolio project! Last year in my CS degree, time for some projects and a portfolio! Keep up the great work.
Maybe a clone of a web app like Facebook or twitter? 👀
You are awesome! i was searching and searching for an easy explanation and i found this video, easy and fast integration.
Absolutely lovely! :) Thanks a lot man. Short straight to business video.
Thanks Dennis this video helped me alot to integrate django with reactjs
Thankyou very much 🔥
This is the tutorial that i want ! Really thank you so much
What about the template engine? Do you just include the {{ variable_name }} in the react components?
Thank you so much Dennis for this tutorial ! It helps me more.
thank you sir this is genius
Thank you for the video, just subscribed!!
thank you sir superb now i can make complete django and react app using axios
Dennis is the Best!
Plz make a tutorial how to deploy a django + react website on heroku
I really like the way to explain things, smooth.
I struggle with making db queries (filters and joins) in django, i always go to gpt to start.
Do you have any videos that can help me build and structure my queries.
(I have no problems with sql)
Very much helpful video, it would be great if you had added some Django logic to the app in the same video so that it will be more clear to us.
This is exactly what I needed. Thank you!
Great video, thank you.
If you've had any difficulty routing every other URL to react, you can use Django's `re_path` as shown below.
Make sure to put it last in the list of `urlpatterns` since Django uses the first match to determine what view to pass control to.
from django.urls import path, include, re_path
from django.views.generic import TemplateView
urlpatterns = [
...
...
re_path(r"^.*", TemplateView.as_view(template_name="index.html")),
]
thx man
Thanks for this CY. I followed the video, but why is it giving me this error:
TemplateDoesNotExist at /
index.html
Thanx a lot ..it worked ...
Good one but just leave the url empty. It works
I don't understand why react should be even used as the view layer in MVC architecture. Isn't that an overkill regardless of the size of the project? Pls enlighten. TIA!!
Guys I need help.!
Okay so I have a react app inside the django project folder.
What i want to do is, give the url to my django app in main app. And then the django app would display the template view.
But when i do the template view its only visible through the root url
Help
in order to fix this, use
from django.urls import path, include, re_path
re_path('.*', TemplateView.as_view(template_name='index.html'))
instead of
path(' ', TemplateView.as_view(template_name='index.html'))
Thanks but please do NextAuth with Django Rest Framework for Authentication, with email and password. Also, adding OAuth (Django-based) on the same tutorial will be great. I am desperetely waiting for your response.
Bro u r just fab.... Need a big project such as blogging or e-commerce on react plus Django.... Love from India
@Dennis Ivy: I was using jQuery/Javascript in Django/Flask for Server side template rendering. But since I learnt React, I deploy React (to fetch API and manage UI) and Flask/Django (only using as backend API) in seperate containers. I see people using React (like jQuery) like traditional Sever side template rendering (Not sure why they don't use Next.js for that purpose?). Please advise if I'm right and share your suggestions. It will be much appreciated and helpful. :)
2 issues:
1) Fallback to index.html for backend for all unrecognized urls
2) Favicon not found: as far as I understand CRA index.html created dynamically so just putting
favicon.ico inside django static folder and rewrite link to it won't be enough
Thank you so much for your sweet content, I'm learning a ton :)
Can you please make a video on Vue + Django Integration, Thank you in advance!
It's a good practice to run build every time I do a change something in the React app?
Thx for the tutorial!
Please bring a tutorial with react and django rest framework
Coming soon :)
I followed this tutorial works fine but when i integrate a template with react app (creating a folder calld assets in public directory) and in index.html i load the bootstrap and jquery, when executing the code gives me this error :
Refused to apply style from '127.0.0.1:8000/assets/css/bootstrap.min.css' because its MIME type ('text/html') is not a supported stylesheet MIME type, and strict MIME checking is enabled.
also for others.
please can you help?
How to setup with Hot reloading? All time build react? It's some sort of crap
I think that you still could view your Frontend changes with npm start.
not getting the static files when using react with vite, any suggestions: with vite its /dist/assets
I found this approach and worked hard on my app but the major query. I have is that can we print a Django template language with react
should I activate virtual env before using react?
Won't it get frustrating when everytime you write a piece of code and to view you want to run build?
bro did you find better integration?
@@roar3850 why do you need this integration? :) You can use react and django simultaneously without that
thanks so much this really helped 🥳
thanks a ton Dennis!
Dennis I like ur content very much.please can u make students management with django + react .. waiting for that plz
Thanks for the tutorial Denis. However, I'm getting errors when i reload pages. Anyone else getting this?
Hi Dennis, I just want to ask if you are also planning on doing some Vue-Django content? Thanks!
I am right to say that this process of integrating React to Django is solely for static website as there is no way React can get context from Django?
If am right, I would like to know if learning mongodb, express and node is better than learning django rest framework for building backend for React
Please do authentication in Next Js with Django Rest Framework.
Thanks Dennis !!
manifest.josn and favicon are not loading. How can I solve that?
Awesome !
I have a question. For all front end thing there is one file index. HTML file but if I want to go to different page for different url how can i do that i will need another. HTML file(just like django templates) how I am gonna do that with react?
Yaa using above mentioned approach , it is throwing while going through multiple routes
You're God :) I thought now that I have learned react my Django skills are a waste! Thank you soooooo much!
I don't know Pyhton/Django but with this set up is it possible to make also API calls to a pyhton server which serves data from a SQL Database?
Hi Denis awesome video, just wanted to ask that can same be done with Angular and Django?
Short and to the point, very noice. Just a small doubt, how to configure the STATIC_ROOT setting for production mode?
Would django not render if we are starting fresh and not building the react app and for the time being select the public folder for the index.html?
how do you then deploy the whole fullstack website onto the web?
This work fine, BUT, I have one problem. Why does React make .git file by default? So I can't upload my project to Github because it says I have subfolder named git... Even if I delete it, problem remains the same... Help?
Thank you so much Dennis
Well done!
Wow dude... dunno how to thank you🤩🤩🤩🤩
How to integrate screens with Django ? Screens designed to be joined with frontend.. please help me with some information or material this can be helpful in completing my task
great tutorial, thank you!
Thanks for making this- what if you are using AWS for hosting static files? And heroku for hosting the entire app?
Good question :) When you run "Run build" these are technically static files. Its a bit complex and I might address it in a separate video but basically you would host your react app in aws s3 buckets.
Can we only use react with django in Class-based-views ?
Thanks Dennis , just what i was looking for. You explained it concisely and to the point. I have a doubt regarding making changes to the react app. How did you manage .gitignore to ignore node_modules and other files ?
Shubham Phadte think you could just add node_modules/* to the gitignore
you are awesome Dennis
thanks very clear
Excellent video
just asking whats the difference between this short best video and some other 1hr videos ?
should we create an api project too within the root?
Hey dennis , will love it if you please do a Vue CLI and Django integration .
this is what I was waiting for!
Perfect :)
is possible install styled-components for react on django?
Thankyou sir . It was a great help
How about I create Django as a separate project and use it as APIs for a separate react project?