Add Postgres Cloud Database - Django Wednesdays ECommerce 43

แชร์
ฝัง
  • เผยแพร่เมื่อ 18 ธ.ค. 2024

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

  • @Codemycom
    @Codemycom  6 หลายเดือนก่อน +2

    Watch Django Wednesdays Ecommerce Playlist Subscribe To My TH-cam Channel:
    bit.ly/3OBQJfN bit.ly/2IGzvOR
    See More At: Join My Facebook Group:
    Codemy.com bit.ly/2GFmOBz
    Learn to Code at Codemy.com Buy a Codemy T-Shirt!
    Take 50% off with coupon code: youtube50 bit.ly/2VC9WUN
    Get The Code
    bit.ly/47xAhWJ

  • @Ihor.Davydenko
    @Ihor.Davydenko 11 วันที่ผ่านมา +1

    If you're having issue like with port or host :
    go to railway -> architecture -> settings -> networking
    There you will fing a combination of real host and port. I replaced them with those that I found in variables and it worked

    • @gamingwithcisco
      @gamingwithcisco 4 วันที่ผ่านมา

      I tried but still getting the error

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

    You, my friend, are the best...thank you for the teachings!

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

      Glad you like them!

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

    The best Python-Django Tutorial ever seen, thank u so much!!!!!!

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

      Wow, thanks!

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

    Would you say this marks the end of the 'adding functionalities' section of creating the website? I'm currently working on this for someone who creates and wants to sell their products, so should I work on the design of the website now before I continue here?

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

    Éxitos tengo tiempo viendo te Saludos desde República Dominicana, Casi 2 años de experiencia como Dev

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

      Happy to hear it!

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

    Thank you sir for the teaching

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

      You are welcome

  • @_____vieve
    @_____vieve 7 วันที่ผ่านมา

    THANK U SO MUCH MR HEISENBERG!!!!!!

  • @OceanTheCat-fi6nk
    @OceanTheCat-fi6nk 6 หลายเดือนก่อน +1

    awesome tutorial - thank you so much! will you be doing any stripe implementation?

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

      Yes, soon

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

    railway pgpassword default password is working but my own env password is not working after many tries, why is that?

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

    Hey John!
    I hope you are doing well.
    Can I please ask for an AWS implementation of the database? Even if its just hooking it up and doing basic things with it.
    I just really love AWS and use it for other projects and I'd like to be able to follow along with your tutorials and knowing how you do the things on railway, but I do it on AWS?
    (even if it is just a random side-video completely outside of the series)

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

      sorta doubt I'll do aws

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

    Thank you a lot, this is very helpful !

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

      Glad to hear it!

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

      @@Codemycom something else, i want to ask if there is a way to get codemy courses for free ?

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

    where are the videos to finish this project ? I have finished video 43 and I thought that there would be more, such as the payment system and launching the site from github.

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

      This is an ongoing playlist, new videos come out every Wednesday...hence the name Django Wednesdays.

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

    Even when I delete orders from the Django Admin payment>Orders area, the order numbers do not reset. For example, if I had 10 orders previously, then deleted all of them and created a new order after filling out the form, it assigns the new order number as 'Order - 11' instead of 'Order - 1'. How can I reset this issue?

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

      You don't. That's not how databases work, and that's not how you would want it to work. Otherwise many people could have the same order number, and you don't want that.

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

      @@Codemycom Yeah right, Thanks.

  • @OmarMuhammed-v5k
    @OmarMuhammed-v5k 4 หลายเดือนก่อน +1

    thank you john and The site is slow before add postegres

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

      that's a matter of your own computer speed since the original database ran on your computer not the cloud where postgres runs...

  • @SeemaAdhikari-s5y
    @SeemaAdhikari-s5y 2 หลายเดือนก่อน +1

    Please can you make one more video of recommendations in this
    Thank you for all this

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

      won't be doing recommendations

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

    Hello I am Abhi from India and I watch your videos because I get to learn a lot from them. You made a video on deploy. I have many projects which are ready for deployment and there are many videos also but I am not able to understand their content.

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

      We'll begin deploying the site in the next video

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

    thanks a lot my teacher

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

      You are very welcome

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

    Can I use MySQL instead of Postgres in this course ?

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

      You can use anything you want anytime you want

  • @infoavi-z5f
    @infoavi-z5f 5 หลายเดือนก่อน

    python decouple can be used instead?

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

      only one way to find out

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

    hi sir !!
    heroku free hosting isnt available anymore can you please point me towards something similar which I can use to deploy my project online and just get a website link ??

    • @Codemycom
      @Codemycom  6 หลายเดือนก่อน +2

      That's what this video is beginning to do... Railway.

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

      @@Codemycom eagerly waiting for next wednesday!! Thnak you for this series!

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

      @@Codemycom Is it for free ?

  • @miniit-iy1gc
    @miniit-iy1gc 6 หลายเดือนก่อน

    Sir, do i understand correctly that we're doing this to make the website accessible online to anyone?

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

      yes

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

    Please make a problem solving playlist!!

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

      I don't know what that is

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

    Lovely man

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

      Thanks

  • @TheLummen.
    @TheLummen. 6 หลายเดือนก่อน

    Oh no ! What happened to MySQL ? Happy to see the content though

    • @Codemycom
      @Codemycom  6 หลายเดือนก่อน +4

      MySQL isn't as good as Postgres for production level websites. But also....what does it matter?

    • @TheLummen.
      @TheLummen. 6 หลายเดือนก่อน +1

      @@Codemycom I trust your judgement John Elder.
      To me it matters because I'm more familiar with MySQL even though the process is the same. Postgres here I go

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

      @@TheLummen. Yeah, django abstracts away the database layer anyway so you're not using mysql or postgres syntax...so you're right, it's all the same...

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

    please can you add videos about django multi tenant?

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

      No that's not really applicable here

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

    I am having this stupid eror and ı couln't find any solution yet! So ı write here as well. if anybody knows how to fix this error. please help me out
    UnicodeDecodeError: ‘utf-8’ codec can’t decode byte 0xf6 in position 79: invalid start byte
    I checked any explanation but none works and again thank you for the course sir!!

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

      if anybody knows what is the issiue please ı will be checking. or ı will lose it :):)

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

      I have been dealing with this for more than a day now and still persists. I couldn't find more or understand why. So by all means if anybody knows. Reach out!

  • @pvxamjad
    @pvxamjad 28 วันที่ผ่านมา

    i got an error when i migrated it
    File "C:\Users\amjad\Desktop\ecom\virt\Lib\site-packages\psycopg2\__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: No such host is known.
    anyone knows solution pls reply

    • @sanoopmohan2247
      @sanoopmohan2247 14 วันที่ผ่านมา

      i have the same error

    • @pvxamjad
      @pvxamjad 14 วันที่ผ่านมา

      @sanoopmohan2247 i know how to solve that

    • @pvxamjad
      @pvxamjad 14 วันที่ผ่านมา

      @sanoopmohan2247 but bro there is no more free deploying in railway but you can connect to the cloud db

    • @sanoopmohan2247
      @sanoopmohan2247 10 วันที่ผ่านมา

      @@pvxamjad how did solved it

    • @pvxamjad
      @pvxamjad 10 วันที่ผ่านมา

      @@sanoopmohan2247 using public url railway . It is assembled in a format . Chack that on google. Add that to settings

  • @TheLummen.
    @TheLummen. 6 หลายเดือนก่อน

    "Oh let's use AWS " ... ! And the doors to hell opened ! It's an arduous process to say the least !

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

      yeah lol it's a hassle

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

    Hello John, I followed along and set up my code as provided by you. But I am encountering an error repeatedly. I looked for answers in the railway community, but in vain. I tried using LLMs and also tried connecting pgAdmin, but always got an error.
    The terminal shows this error - "django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: No such host is known." Please let me know if you are aware of any solutions.
    Thank You

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

      that URL is not a valid hostname. Contact railway support. (postgres.railway.internal should be an actual URL like in my video)

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

      @@Codemycom Thank You John ♥️

    • @rajbhatta5595
      @rajbhatta5595 4 หลายเดือนก่อน +2

      @@Codemycom Hey John, I was able to migrate. PGHOST always shows error. And in my effort to solve the issue, I encountered that a lot of users have been facing the issue. What worked for me is - Settings section provides the Public Networking option to connect with TCP using a proxied domain and port.
      Hope I should share. If you feel like pinning this comment might help others, please feel free to do so.
      Thank You.

    • @Gabriel-ql7eb
      @Gabriel-ql7eb 4 หลายเดือนก่อน

      @@rajbhatta5595 hi, i found that section in settings, but i didn't understand how to use it. Can you explain more detailed please

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

      @@Gabriel-ql7eb use the proxy port: should be 5 numbers long. Format is likely - viaduct.blah.raikways.blah:52368. Check it, and you will get it in few trys.

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

    I'm having an issue that i cannot find a solution.
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
    django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: nodename nor servname provided, or not known
    i'm on a macbook air m2
    i'm from brazil
    i tried running pg_isready, and i get 'accepting connections', however when i type in the host, i get 'no response'
    please help
    thank you

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

      Rewatch the video, follow the steps again, discover what you did differently from the video...

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

      bro have you solved the problem? I have also stucked on this problem.

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

      @@shafiulsabbir7245 The problem was the name or address for the railway server. You have to go to your Railway PostGres Database, Settings, and find your Public Networking. Copy the address and port.

  • @MuhammadAliAbbasKhan-uk2sk
    @MuhammadAliAbbasKhan-uk2sk 4 หลายเดือนก่อน

    hello Sir i have used all the same steps as you but still this error . I cannot understand what is the issue this is the issue
    Microsoft Windows [Version 10.0.19045.4717]
    (c) Microsoft Corporation. All rights reserved.
    D:\Backend Development\Django Ecommerce\Practical\Ecommerce>python manage.py runserver
    Watching for file changes with StatReloader
    Performing system checks...
    System check identified no issues (0 silenced).
    Exception in thread django-main-thread:
    Traceback (most recent call last):
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\base\base.py", line 275, in ensure_connection
    self.connect()
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\asyncio.py", line 26, in inner
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\base\base.py", line 256, in connect
    self.connection = self.get_new_connection(conn_params)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\asyncio.py", line 26, in inner
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\postgresql\base.py", line 277, in get_new_connection
    connection = self.Database.connect(**conn_params)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\psycopg2\__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    psycopg2.OperationalError: could not translate host name "postgres.railway.internal" to address: No such host is known.
    The above exception was the direct cause of the following exception:
    Traceback (most recent call last):
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1073, in _bootstrap_inner
    self.run()
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\threading.py", line 1010, in run
    self._target(*self._args, **self._kwargs)
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\autoreload.py", line 64, in wrapper
    fn(*args, **kwargs)
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\management\commands
    unserver.py", line 136, in inner_run
    self.check_migrations()
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\core\management\base.py", line 581, in check_migrations
    executor = MigrationExecutor(connections[DEFAULT_DB_ALIAS])
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\migrations\executor.py", line 18, in __init__
    self.loader = MigrationLoader(self.connection)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\migrations\loader.py", line 58, in __init__
    self.build_graph()
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\migrations\loader.py", line 235, in build_graph
    self.applied_migrations = recorder.applied_migrations()
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\migrations
    ecorder.py", line 89, in applied_migrations
    if self.has_table():
    ^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\migrations
    ecorder.py", line 63, in has_table
    with self.connection.cursor() as cursor:
    ^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\asyncio.py", line 26, in inner
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\base\base.py", line 316, in cursor
    return self._cursor()
    ^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\base\base.py", line 292, in _cursor
    self.ensure_connection()
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\asyncio.py", line 26, in inner
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\base\base.py", line 274, in ensure_connection
    with self.wrap_database_errors:
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\utils.py", line 91, in __exit__
    raise dj_exc_value.with_traceback(traceback) from exc_value
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\base\base.py", line 275, in ensure_connection
    self.connect()
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\asyncio.py", line 26, in inner
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\base\base.py", line 256, in connect
    self.connection = self.get_new_connection(conn_params)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\utils\asyncio.py", line 26, in inner
    return func(*args, **kwargs)
    ^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\django\db\backends\postgresql\base.py", line 277, in get_new_connection
    connection = self.Database.connect(**conn_params)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "C:\Users\hp\AppData\Local\Programs\Python\Python312\Lib\site-packages\psycopg2\__init__.py", line 122, in connect
    conn = _connect(dsn, connection_factory=connection_factory, **kwasync)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: No such host is known.
    however my host variable is same as on railway . I have used exact steps plus exact copied data from railway app

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

      you have the wrong pg url

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

      @@Codemycom elaborate sir i have the same error

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

      you fixed it ?

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

    hi John,
    I'm David from Nigeria,
    just wanted to thank you for giving these courses for free, I've really learned a lot from them,
    I just wanted your help with this error that keeps happening,
    by the way, I've rewatched the video like 5 times so it's not from me,
    I keep getting this error "django.db.utils.OperationalError: could not translate host name "postgres.railway.internal" to address: No such host is known",
    I have gone online to see how to solve it but got nothing,
    so can you find out what's wrong and get back,
    thank you.

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

      contact railway support

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

      have you solve this? because i alse face the same problem...

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

      bro , did you get the solution?

  • @OceanTheCat-fi6nk
    @OceanTheCat-fi6nk 6 หลายเดือนก่อน

    awesome tutorial - thank you so much! will you be doing any stripe implementation?

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

      Yes, soon