Django & React Web App Tutorial - Authentication, Databases, Deployment & More...

Поделиться
HTML-код
  • Опубликовано: 4 июн 2024
  • In this video, you will learn how to use Python and JavaScript to create a full-stack web application. We will be using Django for the backend & React for the frontend as well as implementing authentication using JWT tokens. And as a bonus, I am going to show you how to deploy this application for free.
    WSO2 Code Challenge: tinyurl.com/4whmzvsd
    Choreo page: tinyurl.com/ywr7ak29
    Choreo docs: tinyurl.com/2fvamzu9
    Discord server for any questions: / discord
    🎞 Video Resources 🎞
    GitHub Repo (Completed Project): github.com/techwithtim/Django...
    JWT Token Explainer Video: • Understanding JSON Web...
    ⏳ Timestamps ⏳
    00:00:00 | Video Overview
    00:00:39 | Project Demo
    00:03:03 | Win a Cybertruck or $100,000
    00:04:32 | Backend Setup/Installation
    00:10:11 | Django Settings
    00:14:39 | Understanding JWT Tokens
    00:18:00 | Making The Registration View
    00:25:40 | Connecting Our Auth Routes
    00:32:58 | Creating Custom Models
    00:38:57 | Writing Create, Read & Delete Views
    00:50:38 | Frontend Installation/Setup
    00:52:20 | Frontend Organization & Axios Setup
    00:59:32 | Writing Protected Routes
    01:08:57 | Navigation & Pages
    01:16:35 | 404 Page
    01:17:30 | Making A Generic Form
    01:26:15 | Adding Form Styles
    01:27:06 | Connecting The Login/Register Form
    01:31:42 | Building The Home Page
    01:44:10 | Building The Note Component
    01:48:41 | Frontend Finishing Touches
    01:52:20 | Database Deployment
    02:00:03 | Deployment Configuration
    02:05:02 | Choreo Project Setup
    02:07:39 | Backend Deployment
    02:14:30 | Frontend Deployment
    02:16:23 | Connecting The Fronted To The Backend | 02:16:23
    Hashtags
    #techwithtim #djangoproject #djangorestframework #javascript

Комментарии • 222

  • @StanWukong
    @StanWukong 2 месяца назад +89

    This couldn't have come at a more perfect time, I'm really grateful to whatever made you release this now

    • @lilian6171
      @lilian6171 2 месяца назад +5

      I agree, just finished the music controller tutorial yesterday

    • @shafiulAlamShafi
      @shafiulAlamShafi 2 месяца назад +3

      Same here, just started learning Django

    • @andrewthompson4228
      @andrewthompson4228 2 месяца назад +3

      Yeah, I needed this right now. Just started working for a company that has a lot of in house build web apps that I need to know better. I am only a backend guy so this will be great.

  • @pycat141
    @pycat141 Месяц назад +11

    Haven't even started watching, but want to thank you for the video in advance. You're effort in raising generations of young (or junior, rather) developers is underestimated. One love, man.

  • @niranjan986
    @niranjan986 2 месяца назад +31

    bro , you are a life saver. keep on doing the great work . We want more backend videos like this. Especially Django

  • @thesnedit5406
    @thesnedit5406 2 месяца назад +19

    You won't believe me but this is exactly what i was looking for. Thank you, tech with tim!

  • @marktaylor9886
    @marktaylor9886 2 месяца назад +6

    Oooh, been hyper focused on this channel for 3 weeks and now this. Nice.

  • @barscantayiz8131
    @barscantayiz8131 2 месяца назад +3

    I liked how effective you use the components and react structure as well as starter template for django and simplisticly explain the concepts. This is a great video and I hope see more of them, django&react different kind of applications.👏🙌.

  • @itzAustin-qr8zx
    @itzAustin-qr8zx 2 месяца назад +7

    Thank TIm.
    this is exactly what i've been looking for, I'm tired of build admin user functionality with Flask. (which i also learned from your Flask x React video)

  • @vicky-mc8063
    @vicky-mc8063 2 месяца назад +1

    This is what i was exactly looking for the past week... Thank you so much buddy... Im really,... REALLY GLAD that i follow ur channel

  • @dhruv3962
    @dhruv3962 2 месяца назад +4

    Thanks Tim that's exactly i was looking for

  • @_zEuS0390_
    @_zEuS0390_ 2 месяца назад +1

    I'm also learning React at the moment. I recently found that there's a shortcut for creating these components in VS Code. You just need to type 'rfce' (function) or 'rafce' (arrow function). This saves a lot of time.

  • @abd1428
    @abd1428 2 месяца назад +1

    nice I have been looking for new content about this , thx Tim

  • @abhisheksharma10600
    @abhisheksharma10600 Месяц назад +2

    This is the best explanation for django and using it with Reactjs. Thank you so much. Please make more videos using the django backend and react frontend. Thank you so much ❤

  • @Complexo_escolar_privado
    @Complexo_escolar_privado 2 месяца назад +3

    I really like your videos, I learn a lot from them. My dream is to belong in one of your classes but first I need to improve my English because I speak Portuguese, I live in Angola Africa and some things here are a bit limited, but I love programming, please don't stop, your channel is one of the schools I attend.

  • @neilkumar3626
    @neilkumar3626 2 месяца назад +3

    perfect; includes everything and is easily understandable

  • @nazmusas
    @nazmusas 2 месяца назад +10

    Next we need FastAPI + React

  • @oluwaseunladeinde410
    @oluwaseunladeinde410 26 дней назад

    Lovely piece of work Tim. Thank you for sharing.

  • @yasynbenrhouma2814
    @yasynbenrhouma2814 2 месяца назад +1

    You are doing god's work, We all appreciate you

  • @gilles01990
    @gilles01990 2 месяца назад

    Thanks Tim for all your content !

  • @RosieLee-em3cc
    @RosieLee-em3cc Месяц назад

    Thanks Tim. What a great tutorial !!!

  • @KayderimGameplays
    @KayderimGameplays 2 месяца назад +1

    Thanks Tim!

  • @EmmanuelBronyah
    @EmmanuelBronyah 2 месяца назад

    Tim, you are a live saver!. Thank you very much.

  • @spsomnath
    @spsomnath 2 месяца назад

    This is exactly what I'm looking for

  • @PyGpt_insight
    @PyGpt_insight 2 месяца назад +9

    sir thank u so much for the heat you are my inspiration why i learnt programming and because of u i am doing it at the age of 14

    • @TechWithTim
      @TechWithTim  2 месяца назад +5

      wow! happy to hear that, keep up the great work!

    • @PyGpt_insight
      @PyGpt_insight 2 месяца назад +4

      thank u sir i will keep it up@@TechWithTim

  • @awan_kurniawan2962
    @awan_kurniawan2962 2 месяца назад

    the one I look forward to the most

  • @rolandonunez1893
    @rolandonunez1893 Месяц назад

    Thank you very much for this!! it helps me a lot!!!

  • @basura3157
    @basura3157 2 месяца назад +3

    Hey Tim, I was just wondering if you had any plans in the near future (few months or so) to make and release an updated flutter tutorial. I've loved all of your tutorials so far and I'm really interested in learning flutter and I'm sure other people would be too.

  • @opokuandrew5716
    @opokuandrew5716 2 месяца назад

    exactly what I was looking for

  • @imSky69
    @imSky69 Месяц назад

    you are helping me alot man , thank u so much

  • @rdnexta
    @rdnexta 2 месяца назад +5

    Bro literally set time like 222222🔥🔥

  • @yessirski7868
    @yessirski7868 Месяц назад

    hey tim been watching you for about 3 years now. Luv the content you provide. Could you do a crash course/tutorial on building an app using MERN stack?

  • @gustavojuantorena
    @gustavojuantorena 2 месяца назад

    Thank you!!

  • @joeakatsa2270
    @joeakatsa2270 22 дня назад

    bless up man waiting for the ecommerce one now

  • @PRIME322
    @PRIME322 2 месяца назад

    Bro thanks for your unconditional help ❤❤❤

  • @insensibility
    @insensibility 2 месяца назад

    You're amazing, Tim!

  • @uzairzarry8691
    @uzairzarry8691 2 месяца назад

    Now you are talking i was waiting for this 😂❤

  • @chegegitiche2994
    @chegegitiche2994 26 дней назад +2

    Thank you for the lovely video quick question at minute 31 you are trying to get the access token but on my side im getting the error "no active account found with given credentials"
    do u have any pointers as how to resolve this

  • @ragnarok9131
    @ragnarok9131 2 месяца назад

    Great video!! Thankyou

  • @osikoyaadeola2530
    @osikoyaadeola2530 Месяц назад

    Thank you so much for your time.

  • @ericmuijs1938
    @ericmuijs1938 Месяц назад

    Perfect, thanks a ton!

  • @akkiammuchannel143
    @akkiammuchannel143 2 месяца назад +1

    Hi Tim, out of curiosity will you consider looking into other parts of programming like game dev with Unity or Godot?

  • @vichhagar
    @vichhagar 2 месяца назад

    Thank you!

  • @devicodebyte
    @devicodebyte 2 месяца назад +1

    Been trying to do user authentication but loads of trouble thank you Tim.

  • @GamePlay-pl2nv
    @GamePlay-pl2nv 2 месяца назад

    hi , i wanted to thank you for all your time and effort,one of most important things we need as a developer is securing our apps,could you please teach us how to secure our apps(secure coding) so it won't be hacked easily, thank you again

  • @bigonhim14
    @bigonhim14 Месяц назад

    Great Tim Thank you.

  • @andresbonelli
    @andresbonelli 4 дня назад

    This is pure gold...

  • @cruzej2228
    @cruzej2228 2 месяца назад

    good project to example to practice

  • @kazmi401
    @kazmi401 2 месяца назад

    Keyboard sound is quite nice.

  • @solartribal7273
    @solartribal7273 Месяц назад

    Finally Django XD. Thanks Tim :)

  • @jonyifamily7311
    @jonyifamily7311 Месяц назад

    Thanks for your great videos

  • @ffzz007
    @ffzz007 Месяц назад

    Thanks Tim alot....
    I have a humble request that if you could add a Social Login too with this application and upload a second part and that would make this a Complete Authentication system.
    Hope you consider this request❤

  • @potrishead
    @potrishead Месяц назад

    Awesome video, thank you so much! But I have a question. Why do you sometimes use 'python3' and sometimes 'python' in the Terminal?

  • @yerneroneroipas8668
    @yerneroneroipas8668 Месяц назад +2

    Hey Tim, I struggle to follow your tutorials but I made it through this one. It would be nice if you broke your github code into branches based on chapters in the video or break the video up and associate the code at each stage as a different branch.

    • @bigonhim14
      @bigonhim14 Месяц назад +1

      Great Idea ..Please Tim consider doing this for your subsequent projects

  • @joshuaarinaitwe8351
    @joshuaarinaitwe8351 Месяц назад

    Tim you should know that you are a genius

  • @YacineNourine
    @YacineNourine Месяц назад

    very informative content, 👏👏🏆

  • @EnglishRain
    @EnglishRain 2 месяца назад

    I got excited to see a DJI app for a sec

  • @yacoubasylla7358
    @yacoubasylla7358 Месяц назад

    Thanks

  • @reza-iq5df
    @reza-iq5df Месяц назад

    Thanks tim

  • @PANDURANG99
    @PANDURANG99 2 месяца назад

    Looking for it long time

  • @somtechnology1811
    @somtechnology1811 2 месяца назад +1

    can tell us where can we find full course for Flask or can u do it
    please

  • @yass3lon
    @yass3lon 2 месяца назад

    What made you change from Windows to macOS?

  • @MATHANM23CS099
    @MATHANM23CS099 2 месяца назад +1

    Brother can you make advance tutorial or explore the advance concept and show any real time project code for beginners

  • @hassanjaber8169
    @hassanjaber8169 2 месяца назад

    More Django Videos Please!

  • @not_amanullah
    @not_amanullah 2 месяца назад

    This is helpful ❤

  • @Maxmarcos84
    @Maxmarcos84 9 дней назад

    Do you have a video where you explain how to handle errors and show the actual server message, because the catch error from this exaple just says "Request failed with status code..something" when try to create an user thay already exist or you try to login whith a wrong password. Thanks!

  • @gabrielt.jaeger2722
    @gabrielt.jaeger2722 2 месяца назад

    Can we have server-side rendering with django like in nextjs?

  • @batuklal
    @batuklal Месяц назад

    hey completed this one and everythin worked fine now i will modify it more so i can upload it in my resume since this is my first project.

    • @bigonhim14
      @bigonhim14 Месяц назад

      Congrats Were you able to upload the proect on choreo

    • @batuklal
      @batuklal Месяц назад +1

      @@bigonhim14 yeah every thing was fine and uploaded it tho the project is very basic we should try to implement update partsince it doesn't cover all crud operation

  • @jonn5422
    @jonn5422 15 дней назад

    trying to follow along on this but React is not a Buildpack option for me when creating the frontend service in choreo...

  • @hasithawikramasinghe7293
    @hasithawikramasinghe7293 2 месяца назад

    Hey, Thank you very much Tim. This is an awesome video. at the last moment in the deployment part when I'm trying to create a connection for frontend, I'm getting an error called "Something went wrong while creating connection for Development environment. As a result the connection was partially created." I tried almost everything to get rid of this issue. Do you have any idea what can I try further?

    • @tishan-89
      @tishan-89 Месяц назад

      Please check whether your backend is deployed in to the dev environment before deploying frontend

  • @culdezack
    @culdezack Месяц назад

    django newbie here, so if I wanted to display the username in the home page what would be the best way to do that? could I just access that in a view somehow?

  • @Saibentos
    @Saibentos 2 месяца назад

    Good job

  • @ValentinaSirbu-qd5zo
    @ValentinaSirbu-qd5zo Месяц назад

    Hi, is there any other platform that would allow to host the website for free/ or for a smaller price but from a private repo?

  • @oj43085
    @oj43085 2 месяца назад +1

    very cool! following along the video , stuck at api.js does not provide export named 'api' even though it does.

    • @TechWithTim
      @TechWithTim  2 месяца назад +1

      Just make sure you have the export name before it

  • @batuklal
    @batuklal Месяц назад

    can u pls make a e commerce website fully complished with django rest framework it will be very helpfull in one video

  • @VarunTripathi8307
    @VarunTripathi8307 2 месяца назад

    This video will cross million views

  • @TrilioniME
    @TrilioniME Месяц назад

    FastAPI + React example please. Thank you for Flask and Django.

  • @kostiantynjohanlanguedoc3155
    @kostiantynjohanlanguedoc3155 2 месяца назад

    Thank you very much 😊 for your job... That's really helpful part of my personal education 😁

  • @danielhalmstrand2123
    @danielhalmstrand2123 21 день назад

    Hello Tim and thank you for a great tutorial. I used your tutorial and learned a lot. I have some error when I try to login and it is 415 error saying that the content-type should be "text/jsx" and I keep getting that in the error alert. I tried to add "config.headers.setContentType("text/jsx");" at start of the api.js after getting the token from local storage but still getting same error. I wopuld appreciate it if you could assist me with that.

  • @Michelle-me6sg
    @Michelle-me6sg Месяц назад +3

    should we be hashing the user passwords we are saving? I am getting error "{
    "detail": "No active account found with the given credentials"
    }"

    • @MuhammadHaseebAhmed
      @MuhammadHaseebAhmed Месяц назад

      have you figure out the problem?

    • @gavin4056
      @gavin4056 6 дней назад

      yea im getting the same issue, the token obtain only works with superuser logins

  • @b-ball7458
    @b-ball7458 2 месяца назад +4

    Was really enjoying the tutorial until I ran into an error when doing the make migrations where it states "connection to server on socket "/tmp/.s.PGSQL.5432" failed: Socket operation on non-socket
    Is the server running locally and accepting connections on that socket?" Cannot get past this :(

    • @oblivion7300
      @oblivion7300 Месяц назад +1

      You and i seem to be the only ones following along I was doing okay Unttil I kept running into CORS issue added CORS to chrome browser and still having an issue. I’m learning its best to to learn from ChatGPT or something like that because at least with that you can get an answer back

    • @CamilleLeon
      @CamilleLeon Месяц назад +1

      try changing your 'settings.py' file ln98 to DATABASES = {
      "default": {
      "ENGINE": "django.db.backends.sqlite3",
      "NAME": BASE_DIR / "db.sqlite3",
      }
      }

    • @oblivion7300
      @oblivion7300 Месяц назад +1

      @@CamilleLeon It was. typo. then I had a CORS issue that drove me crazy and then I got a chrome plugin that allowed it to work.When your learning to code this can be so frustrating

  • @abdulhannan8129
    @abdulhannan8129 2 месяца назад

    Hello tim sir. Sir I have a question that I am not good at maths so can I learn dsa and become good at it??

  • @poldiaz
    @poldiaz Месяц назад

    Failed building wheel for psycopg2" - Windows using virtualenv and pip solution please

  • @kennymilestech1576
    @kennymilestech1576 Месяц назад +1

    Hey Tim i get an axios error 500 cannot login or register but locally project was working fine. On choreo its not with that error, what am i missing

    • @user-os4lj3pi4q
      @user-os4lj3pi4q Месяц назад

      Try to also read the error in console. The console gives information that is more helptul.

  • @Xryndelub228
    @Xryndelub228 7 часов назад

    Thanks a lot, Tim! But I've encountered such a problem, connected to a module named "rest_frameworks." For some reason, it gives me this error: ModuleNotFoundError: No module named'rest_frameworks'. I tried to find a solution on the internet, but I couldn't find anything that worked for me. Can you please help me? (If you know what the problem is)

  • @ZoneTasker
    @ZoneTasker Месяц назад

    When building the frontend I keep getting the following error: Rollup failed to resolve import "react-router-dom" from "/app/src/App.jsx". Anyone has any ideas why? It's happening on the deployment to Choreo

  • @simplegametutorials1341
    @simplegametutorials1341 2 месяца назад

    18:47 - I am making a project Manager. Do you have any recommendations? Like for example, What can I use for collaboration?

  • @nefix6819
    @nefix6819 2 месяца назад

    Maybe react & fastapi video?

  • @julioccorderoc
    @julioccorderoc Месяц назад +2

    Can't go beyond 28:42.
    When running the command, it shows the error:
    connection to server at "localhost" (::1), port 5432 failed: fe_sendauth: no
    password supplied
    I just google it and it relates to more complex problems (when setting up the database), I dont think that is my case

    • @Msgilt
      @Msgilt 24 дня назад +1

      I am also stuck at that point, but I keep getting the "Import .serializers could not be resolved" error. I've been searching for days for a solution.

    • @julioccorderoc
      @julioccorderoc 24 дня назад

      @@Msgilt I had to restart the project, an error in the setup

  • @YannAriell
    @YannAriell 2 месяца назад

    nice, what about Django & svelte

  • @user-cc9hi9nm9i
    @user-cc9hi9nm9i Месяц назад +1

    Hey Tim thank you so much for the project. I finished it 🎉. Apparently the verification link to submit my application for the WSO2 Code Challenge is broken 💔. Keeps saying I should refresh and try again later.

    • @bigonhim14
      @bigonhim14 Месяц назад

      Does it tell you how many draws you have been awarded

  • @aryashbajaj223
    @aryashbajaj223 Месяц назад +1

    I am getting this error after deploying the backend component -
    2024-04-12T18:38:21.7410641Z ImportError: Couldn't import Django. Are you sure it's installed and available on your PYTHONPATH environment variable? Did you forget to activate a virtual environment? {"level":"INFO","logContext":null}
    Venv is activated so what's the problem?

    • @bigonhim14
      @bigonhim14 Месяц назад

      when running the server ensure the virtual environment is activated and if activated ensure you run pip install django

  • @AdolfRizzler41
    @AdolfRizzler41 Месяц назад +4

    I am node developer but want to learn django because it seems better

    • @kodiak809
      @kodiak809 Месяц назад

      but node is faster

    • @muzamilrashid7265
      @muzamilrashid7265 Месяц назад

      @@kodiak809 but nowadays most websites have Django as backend :-(

    • @osmankain1508
      @osmankain1508 Месяц назад +1

      And Django is more secure ​@@kodiak809

  • @infinitespace1982
    @infinitespace1982 11 дней назад +1

    I need help at 1:29:40. When I try to register with a new account, instead of redirecting me to the login route, it returns an error message,
    "AxiosError: Request failed with status code 404"

    • @rhodium92
      @rhodium92 10 дней назад

      I have the exact same error, the Django server isnt available for the frontend when logging in or registering and throws a 404 error, but the server is definitly online.

    • @infinitespace1982
      @infinitespace1982 8 дней назад

      @@rhodium92 Is there no way to fix this?

  • @Hari-ln1qd
    @Hari-ln1qd Месяц назад +1

    can anyone plz help me with login and register route connection at 1:29:00 , my code is crt but after i press on register button its showing axios error, status 404 error in the browser ????how to solve this plz help

    • @aebel.shajan
      @aebel.shajan 25 дней назад

      I just fixed it. My issue was that i had the keyword baseUrl instead of baseURL in api.js

  • @samdktv2158
    @samdktv2158 Месяц назад

    I cannot go pass 1:15:45 because mine does not show whatever yours is showing. All it shows is a blank page. Even when I navigate to other pages like register or home or login, it is still a blank page. Please help me!!!
    PS: I fixed it. Took me a while. I spelled Register wrong

  • @aruns6214
    @aruns6214 2 месяца назад

    What the f*ck i am waited for perfect video for django+react ,thank you so much man🥳🥳🥳🥳🥳❤❤❤❤❤

  • @pavanmadhusudan6646
    @pavanmadhusudan6646 2 месяца назад

    are function based views better than class based?

  • @timbrap4693
    @timbrap4693 2 месяца назад +2

    Decoding jwt on frontend? ):

  • @user-tu5mz6ts6i
    @user-tu5mz6ts6i 24 дня назад

    indepth project with postgresql,django and react like ecommerce pls

  • @udithweerasinghe6402
    @udithweerasinghe6402 Месяц назад

    How to deploy both components to production?

  • @jessepinkman3734
    @jessepinkman3734 Месяц назад

    Nice Session , BIG Thanks