steven-king / mj583

J583 Advanced Interactive Media
15 stars 11 forks source link

Django Tutorial #9

Open steven-king opened 6 years ago

steven-king commented 6 years ago

Complete the install guide and through Part 2 of the Django Project Tutorial https://docs.djangoproject.com/en/2.0/intro/

sabsc commented 6 years ago

Hi! I've been stuck at steps that involve Postgres and Postico.

For Postgres: I've made the polls folder and edited all the .py files in it that Part 1 mentioned but I can only get so far since vital commands involving python manage.py + anything after won't work. I get the error message we got in class about databases: django.db.utils.OperationalError: could not translate host name "postgres" to address: nodename nor servname provided, or not known.

I remember we got this before and then we set things up with $HOME/pg-data-583 and the lines to launch the postgres container. I did that, but then I get stuck again at Postico.

Postico issues: I can't connect to localhost like we did in class. I have it set to localhost and port 5432 and all the other stuff I used successfully before. This is what I get: "Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused." I'm not sure if it's because port 5432 is potentially closed (which could be my firewall at my apartment?) or if it has something to do with Postgres. All in all, I can't really load the Django page in my browser at http://127.0.0.1:8000/ like we did in class or move forward in the tutorial when it involves "python manage.py __."

steven-king commented 6 years ago

You can use the SQLite version for the tutorial. I will explain and demonstrate how to fix this Postgres/docker problem tomorrow in class.

On Feb 25, 2018, at 11:26 PM, Sabrina notifications@github.com<mailto:notifications@github.com> wrote:

Hi! I've been stuck at steps that involve Postgres and Postico.

For Postgres: I've made the polls folder and edited all the .py files in it that Part 1 mentioned but I can only get so far since vital commands involving python manage.py + anything after won't work. I get the error message we got in class about databases: django.db.utils.OperationalError: could not translate host name "postgres" to address: nodename nor servname provided, or not known.

I remember we got this before and then we set things up with $HOME/pg-data-583 and the lines to launch the postgres container. I did that, but then I get stuck again at Postico.

Postico issues: I can't connect to localhost like we did in class. I have it set to localhost and port 5432 and all the other stuff I used successfully before. This is what I get: "Is the server running on host "localhost" (::1) and accepting TCP/IP connections on port 5432? could not connect to server: Connection refused." I'm not sure if it's because port 5432 is potentially closed (which could be my firewall at my apartment?) or if it has something to do with Postgres. All in all, I can't really load the Django page in my browser at http://127.0.0.1:8000/ like we did in class or move forward in the tutorial when it involves "python manage.py __."

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/steven-king/mj583/issues/9#issuecomment-368386851, or mute the threadhttps://github.com/notifications/unsubscribe-auth/ABo_GVb2PPfDJaD5h3pbkvvmXdeH4lgCks5tYjJpgaJpZM4SOE8d.