Easiest Way To Connect Django To A Postgres Database

แชร์
ฝัง
  • เผยแพร่เมื่อ 5 ก.ย. 2024

ความคิดเห็น • 84

  • @DennisIvy
    @DennisIvy  หลายเดือนก่อน +1

    Don't forget to check out my Complete Django course: dub.sh/JNH6EeA

  • @facttrendz1314
    @facttrendz1314 2 ปีที่แล้ว +68

    Please create a tutorial on Django channels and websockets

    • @StickMan1316
      @StickMan1316 2 ปีที่แล้ว +3

      Yesss. Everyone needs to thumbs up this request.

    • @koreckie4967
      @koreckie4967 2 ปีที่แล้ว +2

      He has already does.

    • @knowledgedose1956
      @knowledgedose1956 ปีที่แล้ว

      Agree.
      Денис, пожалуйста 🙏🏻

  • @ericcartman2294
    @ericcartman2294 2 ปีที่แล้ว +33

    Quick tip: Windows users, you dont have to type full word "python" in terminal, "py" or "py3" / "py2" (if you have multiple versions installed) is enough. A bit shorter, than before, still faster than full word 😅.
    P. S. Great tutorials Dennis, always appreciate it. 👍🏽

  • @JVPDesign
    @JVPDesign 2 ปีที่แล้ว +14

    For how great things like FastAPI, Flask, ExpressJS, etc are, I keep coming back to Django because of just how easy it is to get things up and running so quickly

  • @arsham7584
    @arsham7584 2 ปีที่แล้ว +8

    Probably the best way for connecting Django to a DB is using Docker (both in production and development level) but this is also such a nice way👌🏾🔥
    Thanks Dennis✨

    • @MartinoxxHD
      @MartinoxxHD 2 ปีที่แล้ว +1

      what about an RDS instance in AWS?

    • @arsham7584
      @arsham7584 2 ปีที่แล้ว +3

      @@MartinoxxHD i live in iran, so i can’t use AWS😁
      i use Docker in VPS servers and it’s great
      but i heard that AWS is a great way to use and deploy Django Apps👌🏾

  • @mgdzh8609
    @mgdzh8609 10 หลายเดือนก่อน +1

    1 year later steel the best method TNX man

  • @CodeWithClinton
    @CodeWithClinton 2 ปีที่แล้ว +3

    Wow, thank you so much for this video. Railway is much more faster to setup than AWS. Thanks again Dennis. 💙

  • @osinaikegbemileke8271
    @osinaikegbemileke8271 2 ปีที่แล้ว +3

    Wow, so clean and fast. Please make a video on how to host a DRF project

  • @anubhavgupta7155
    @anubhavgupta7155 2 ปีที่แล้ว +1

    When deploying on any platform, let's say Heroku, we get a connection limit with Postgres, about 20 for free plan and upto 120 for paid.
    So how do we deal with this connection limit on a real project because upto 120 connection is way too less if you have high traffic.
    A tutorial/explanation will be highly appreciated on it, as to how to scale Django+Postgres app !

  • @lejiendtech4248
    @lejiendtech4248 ปีที่แล้ว +1

    short and concise. Love it, straight to the objective.

  • @nayeemsyed5716
    @nayeemsyed5716 หลายเดือนก่อน

    watching this on the same day u made this....july 19...cheers

  • @gufran-ansari
    @gufran-ansari ปีที่แล้ว +2

    Hey Dennis,
    Can you create a video on how to host your django aap on railway from start to end with everything we need just like you did on django 3.0 crash course with heroku? I'm bit confuse if we need AWS with railway. I already watched your video about moving app from heroku to railway. But I request you to create one with everything (Railway, postgres and etc). Please.
    THank you.

  • @JayShreeRamJayMaaBhavani
    @JayShreeRamJayMaaBhavani 2 ปีที่แล้ว +2

    Thanks Dennis for this video...really helpful

  • @Johan87577
    @Johan87577 ปีที่แล้ว

    Damn, this was quick. Bookmarking this video for future needs.

  • @realdevdiv
    @realdevdiv 2 ปีที่แล้ว +1

    hey Dennis what about if you want to schedule a command

  • @variousvideos554
    @variousvideos554 ปีที่แล้ว

    Really you are super ! ,I solved my problem with your method ,Big thanks !

  • @meowmeow21588
    @meowmeow21588 ปีที่แล้ว

    tip for mac: I had trouble pip installing psycog2, so I did pip install postgres and it worked

    • @abirzayn1839
      @abirzayn1839 10 หลายเดือนก่อน

      im getting the same error

  • @divinendubuisi9593
    @divinendubuisi9593 ปีที่แล้ว

    It love the rail way, It really works

  • @abdifatahwebdeveloper117
    @abdifatahwebdeveloper117 ปีที่แล้ว

    Very helpfull thanks
    Make another video for this concept like payment part

  • @techwithdenzel
    @techwithdenzel ปีที่แล้ว

    This has been helpful, thank you.

  • @BitByBit1808
    @BitByBit1808 8 หลายเดือนก่อน

    Wow that is awesooooome! Thank you!

  • @kaabemedia
    @kaabemedia 2 ปีที่แล้ว

    Thanks Dennis
    I would like if u can show us how to create django restframework/fastapi multi tenant app and react

  • @pgtechmedia5624
    @pgtechmedia5624 2 ปีที่แล้ว

    Dennis, Thanks for this video, really help.. Please, can you make a video on how to Dockerize a django project and why to do it.. Thanks

  • @besnik7271
    @besnik7271 ปีที่แล้ว

    my django project which was hosted on heroku and AWS S3 wont work anymore when moved to Railway as the DATABASE_URL is still linked via Heroku which has been disabled. How do I link the database URL to railway, I have tried everything!

  • @benlong1062
    @benlong1062 ปีที่แล้ว

    Awesome, it worked great. Thanks!

  • @user-np3ng9cj9i
    @user-np3ng9cj9i 4 หลายเดือนก่อน

    thanks bro, so so superfast

  • @gmtufaile
    @gmtufaile ปีที่แล้ว +1

    Hey Dennis, Im already using django+postgres for a while, and now Im struggling to handle timezones. Basically I always send to postgres, via django ORM, a timestamp with timezone awareness (-03:00), but postgres automatically saves it with timezone (+00:00), which leads my code to incorrectly calculate usage time for my users. Im "solving" it by adding again the timezone awareness when requesting this info, but it seems not right. Do you happen to face this issue too? How is the best way to handle this problem?

    • @rawansaid3072
      @rawansaid3072 7 หลายเดือนก่อน

      solution close your vs and open it again it will work

  • @WeedsePoentah
    @WeedsePoentah 9 หลายเดือนก่อน

    why that extra comma though?

  • @yaswanthsai9894
    @yaswanthsai9894 11 หลายเดือนก่อน

    What do when in production like hosting on some other websites like Vercel, Netlify etc.? What to do when the password is available in the source code.

  • @kapitankidlattv9613
    @kapitankidlattv9613 2 ปีที่แล้ว

    Great tutorial. I am using Postgres, what is the upside of this, because as of now, I run my django app in a linux virtual machine using nginx, and installed postgres there. Will I be better of using another host for my postgres? Thanks and you really helped a lot!

  • @devstuff92
    @devstuff92 2 ปีที่แล้ว

    Amazing! I did this but I can't seem to connect it to my heroku app even with the variables. Please help

  • @elenaandreeva6120
    @elenaandreeva6120 ปีที่แล้ว

    A very easy to follow tut! Thank you, Dennis

  • @tech_with_mike
    @tech_with_mike 2 ปีที่แล้ว

    Wow, that was amazing!

  • @abdulqadar9580
    @abdulqadar9580 ปีที่แล้ว

    That was amazing tutorial.

  • @clasesutnfrc8699
    @clasesutnfrc8699 4 หลายเดือนก่อน

    01:38 Install psycopg2
    02:56 Settings | Change database name

  • @desphixs
    @desphixs ปีที่แล้ว

    Hey Mr. Dennis does Railway host Static Files??

  • @SurajSingh-lu8ei
    @SurajSingh-lu8ei ปีที่แล้ว

    after migrating to postgress does it have old data that was stored in db.sqlite??

  • @StickMan1316
    @StickMan1316 2 ปีที่แล้ว

    Bro you are literally posting the exact stuff that I need. Lol I used postgres in the past for Ruby on Rails and I was wondering if I could do it for Django cuz it's really similar.

  • @gamingwithrksaver4868
    @gamingwithrksaver4868 ปีที่แล้ว

    Thnks bro you solved a big prob

  • @City__Walker
    @City__Walker ปีที่แล้ว

    If you use local installed postgres, FIRST create base in postgres, for example "my_db" and migrate command is passed!

  • @alfred5523
    @alfred5523 2 ปีที่แล้ว

    Thanks for the plug 🔌

  • @user-hr4gr8qo6l
    @user-hr4gr8qo6l 7 หลายเดือนก่อน

    Can i link postgresql after worked on project

  • @aydensmith163
    @aydensmith163 ปีที่แล้ว

    Hey, I tried to deploy my web app to vercel but I'm getting this error: Error: pg_config executable not found. It then directed me to install the package psycopg2-binary, which I did but I'm still getting the same error.

    • @user-df7fb5tv7d
      @user-df7fb5tv7d 10 หลายเดือนก่อน

      Was the issue resolved?

  • @obapalacebenin9413
    @obapalacebenin9413 2 ปีที่แล้ว

    saying Hi from Twitter

  • @faycalzetoutou3543
    @faycalzetoutou3543 2 ปีที่แล้ว

    Hi dennis , can i use railway instead of aws s3 to show images and media file ?

  • @stentechy3346
    @stentechy3346 2 ปีที่แล้ว

    Hi Dennis, is there a reason you didn't use local Postgres?

  • @djlit7928
    @djlit7928 9 หลายเดือนก่อน

    Thank you, a little tip- it's not going to connect if you don't have a venv..

  • @vitalii_myt
    @vitalii_myt ปีที่แล้ว

    Can't find how to run python manage.py makemigrations on railway side. How do I?

  • @manelamrouche5041
    @manelamrouche5041 ปีที่แล้ว

    I need how to connect Django with HDFS, how can I do that ?

  • @City__Walker
    @City__Walker ปีที่แล้ว

    Same process with local installed postgres?

  • @javiermadriz7834
    @javiermadriz7834 ปีที่แล้ว

    Hi! Dennis, there are lots of people that see your videos from Latam, can you speak a little bit slowly? Thanks for your support

  • @qurashishebi7988
    @qurashishebi7988 2 ปีที่แล้ว

    Thank you soo much

  • @huzaifafaheem6382
    @huzaifafaheem6382 ปีที่แล้ว

    Could someone help me clarify a question? I've successfully deployed my Django App on Railway using SQLite. Now, let's say a user makes a post request that updates the database. Will these changes be reflected in my GitHub repository? In other words, if I make a new push to my GitHub repo and Railway re-deploys, will it recognize that the existing database file is already up to date and avoid replacing it with the outdated one from GitHub?

    • @DennisIvy
      @DennisIvy  ปีที่แล้ว +1

      Changes to the database will only be reflected temporarily but will not remain, meaning, you may see changes in your database but it will not update your files in github. You will want to use a production level database like postgres

  • @janing06
    @janing06 ปีที่แล้ว

    How to use existing database

  • @mutebialvin3124
    @mutebialvin3124 2 ปีที่แล้ว

    Awesome video how about to create one for connecting MySQL to a Django app

  • @Sure_Math_Center
    @Sure_Math_Center ปีที่แล้ว

    Thank you

  • @KryptoGuruji
    @KryptoGuruji 2 ปีที่แล้ว

    Hi bro, can you please do a project on real-time chat application using Django and Channels.

  • @biniyammengiste7413
    @biniyammengiste7413 2 ปีที่แล้ว

    Thank you do much

  • @danishrather1785
    @danishrather1785 2 ปีที่แล้ว

    Plzz Share.... market of Django...

  • @treedigital346
    @treedigital346 2 ปีที่แล้ว

    how to deploy my django project on localhost as company server ; can you help me

    • @kapitankidlattv9613
      @kapitankidlattv9613 2 ปีที่แล้ว

      You need to have a LAMP stack or XAMMP (for Windows PC) then make your server IP static and then configure your router to direct all port 80 or 8000 request to the machine :)

  • @sakatagintoki8835
    @sakatagintoki8835 2 ปีที่แล้ว

    Sir can u explain django custom user model please 😔

  • @user-st6fy2wu5t
    @user-st6fy2wu5t ปีที่แล้ว

    Thanks!!

  • @austinhomolka
    @austinhomolka ปีที่แล้ว

    thanks!

  • @edivaldoluisbonfim3194
    @edivaldoluisbonfim3194 ปีที่แล้ว

    I am having problems to connect my django app to my railway database, is there anyone who can help me with that?

    • @manjaxyz
      @manjaxyz ปีที่แล้ว

      me too, do you resolve it?

    • @TamDaoSpecialist
      @TamDaoSpecialist ปีที่แล้ว

      me too. the mirgation doesn't create all these tables. Anybody solved it?

    • @TamDaoSpecialist
      @TamDaoSpecialist ปีที่แล้ว

      Found the solution. I Forogot to safe the file after changing the Database Paramters

  • @symbolicmeta1942
    @symbolicmeta1942 ปีที่แล้ว

    Getting this error when I set this up:
    502 Bad Gateway
    nginx/1.22.1

  • @kokiezz
    @kokiezz 7 หลายเดือนก่อน

    in 3 minutes?

  • @muhammad_abir
    @muhammad_abir 2 ปีที่แล้ว +1

    please make a video about django signals oversimplified
    class based view, generic
    drf
    signals
    channels
    for new comers these are most confusing part of django, I think

  • @kadeus
    @kadeus ปีที่แล้ว

    🤏

  • @sarahwanyeki
    @sarahwanyeki 2 ปีที่แล้ว

    Thanks so much

  • @fahansheikh
    @fahansheikh ปีที่แล้ว

    thank you

  • @frameff9073
    @frameff9073 2 ปีที่แล้ว

    thank you