Easiest Way To Connect Django To A Postgres Database

Поделиться
HTML-код
  • Опубликовано: 9 фев 2025

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

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

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

    • @Noone-1980
      @Noone-1980 2 месяца назад

      Thanks for the video, really appreciate it. I already bought your course. Will you be making more in the future? Relational database CRUDS would be awesome. Can't wait to purchase more courses from you. Cheers.

  • @facttrendz1314
    @facttrendz1314 2 года назад +72

    Please create a tutorial on Django channels and websockets

    • @StickMan1316
      @StickMan1316 2 года назад +5

      Yesss. Everyone needs to thumbs up this request.

    • @koreckie4967
      @koreckie4967 2 года назад +2

      He has already does.

    • @knowledgedose1956
      @knowledgedose1956 Год назад

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

  • @felomleron.ml101
    @felomleron.ml101 2 года назад +38

    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 года назад +15

    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

  • @CodeWithClinton
    @CodeWithClinton 2 года назад +4

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

  • @mgdzh8609
    @mgdzh8609 Год назад +1

    1 year later steel the best method TNX man

  • @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👌🏾

  • @osinaikegbemileke8271
    @osinaikegbemileke8271 2 года назад +3

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

  • @lejiendtech4248
    @lejiendtech4248 2 года назад +1

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

  • @JayShreeRamJayMaaBhavani
    @JayShreeRamJayMaaBhavani 2 года назад +2

    Thanks Dennis for this video...really helpful

  • @Johan87577
    @Johan87577 2 года назад

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

  • @nayeemsyed5716
    @nayeemsyed5716 6 месяцев назад

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

  • @variousvideos554
    @variousvideos554 Год назад

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

  • @techwithdenzel
    @techwithdenzel Год назад

    This has been helpful, thank you.

  • @divinendubuisi9593
    @divinendubuisi9593 Год назад

    It love the rail way, It really works

  • @BitByBit1808
    @BitByBit1808 Год назад

    Wow that is awesooooome! Thank you!

  • @elenaandreeva6120
    @elenaandreeva6120 Год назад

    A very easy to follow tut! Thank you, Dennis

  • @smartengs
    @smartengs 4 месяца назад +1

    👍 awesome

  • @gmtufaile
    @gmtufaile 2 года назад +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 Год назад

      solution close your vs and open it again it will work

  • @meowmeow21588
    @meowmeow21588 Год назад

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

  • @abdifatahwebdeveloper117
    @abdifatahwebdeveloper117 2 года назад

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

  • @benlong1062
    @benlong1062 2 года назад

    Awesome, it worked great. Thanks!

  • @Odinson-d6d
    @Odinson-d6d 9 месяцев назад

    thanks bro, so so superfast

  • @gufran-ansari
    @gufran-ansari 2 года назад +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.

  • @obapalacebenin9413
    @obapalacebenin9413 2 года назад

    saying Hi from Twitter

  • @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 !

  • @abdulqadar9580
    @abdulqadar9580 2 года назад

    That was amazing tutorial.

  • @gamingwithrksaver4868
    @gamingwithrksaver4868 Год назад

    Thnks bro you solved a big prob

  • @realdevdiv
    @realdevdiv 2 года назад +1

    hey Dennis what about if you want to schedule a command

  • @desphixs
    @desphixs 2 года назад

    Hey Mr. Dennis does Railway host Static Files??

  • @alfred5523
    @alfred5523 2 года назад

    Thanks for the plug 🔌

  • @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

  • @clasesutnfrc8699
    @clasesutnfrc8699 9 месяцев назад

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

  • @tech_with_mike
    @tech_with_mike 2 года назад

    Wow, that was amazing!

  • @besnik7271
    @besnik7271 2 года назад

    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!

  • @djlit7928
    @djlit7928 Год назад

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

  • @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.

  • @SurajSingh-lu8ei
    @SurajSingh-lu8ei Год назад

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

  • @faycalzetoutou3543
    @faycalzetoutou3543 2 года назад

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

  • @kaabemedia
    @kaabemedia 2 года назад

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

  • @javiermadriz7834
    @javiermadriz7834 2 года назад

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

  • @stentechy3346
    @stentechy3346 2 года назад

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

  • @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!

  • @yaswanthsai9894
    @yaswanthsai9894 Год назад

    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.

  • @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

  • @Ledge2062
    @Ledge2062 Год назад

    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.

  • @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

  • @City__Walker
    @City__Walker 2 года назад

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

  • @City__Walker
    @City__Walker 2 года назад

    Same process with local installed postgres?

  • @ZIBI0001
    @ZIBI0001 7 дней назад

    Thanks but I tried setting up and configuring, and I get this error: could not translate host name

  • @qurashishebi7988
    @qurashishebi7988 2 года назад

    Thank you soo much

  • @vitalii_myt
    @vitalii_myt 2 года назад

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

  • @WeedsePoentah
    @WeedsePoentah Год назад

    why that extra comma though?

  • @Thehonestlens-7
    @Thehonestlens-7 Год назад

    Can i link postgresql after worked on project

  • @manelamrouche5041
    @manelamrouche5041 Год назад

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

  • @biniyammengiste7413
    @biniyammengiste7413 2 года назад

    Thank you do much

  • @danishrather1785
    @danishrather1785 2 года назад

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

  • @омарсолиман
    @омарсолиман 2 года назад

    Thanks!!

  • @mutebialvin3124
    @mutebialvin3124 2 года назад

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

  • @KryptoGuruji
    @KryptoGuruji 2 года назад

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

  • @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 :)

  • @austinhomolka
    @austinhomolka 2 года назад

    thanks!

  • @frameff9073
    @frameff9073 2 года назад

    thank you

  • @Troll_For_Laughs
    @Troll_For_Laughs 19 дней назад

    When I connect it showing unknown host

  • @sakatagintoki8835
    @sakatagintoki8835 2 года назад

    Sir can u explain django custom user model please 😔

  • @jyy1815
    @jyy1815 14 дней назад

    there occurs an error with PGHOST values.

  • @skaffen
    @skaffen 3 месяца назад

    "Go ahead and go ahead and go ahead" come on.

  • @edivaldoluisbonfim3194
    @edivaldoluisbonfim3194 2 года назад

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

    • @manjaxyz
      @manjaxyz 2 года назад

      me too, do you resolve it?

  • @janing06
    @janing06 Год назад

    How to use existing database

  • @kokiezz
    @kokiezz Год назад

    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

  • @m.h.agames1472
    @m.h.agames1472 2 месяца назад

    Why do we use posygres database if we already have SQLite3 which is Django default

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

      it’s called sqLITE for a reason

  • @SeekingUltimateSynthesis
    @SeekingUltimateSynthesis 2 года назад

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

  • @kadeus
    @kadeus Год назад

    🤏

  • @sarahwanyeki
    @sarahwanyeki 2 года назад

    Thanks so much

  • @fahansheikh
    @fahansheikh Год назад

    thank you

  • @Sure_Math_Center
    @Sure_Math_Center Год назад

    Thank you