3

i know i have seen similar questions on the issue but most of them seemed to be solved by allowing the port 8000 by using the command sudo ufw allow 8000. i have tried that but it is still not displaying when i visited my droplet_ipaddress:8000 link. i followed the official tutorials https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-22-04.

SYSTEM INFORMATION
    OS =  Ubuntu 22.04 LTS
    Python  = 3.10
    Django  = 4.0.4

the only difference with my work and the project process is that i did not build an dummy django project on my digitalocean vps rather i use git to clone my project repo and did the neccesary dependency installing using pip. Has anyone encountered the same problem and is there any solution.

when ever i ran python manage.py runserver 0.0.0.0:8000

the output is shown below as expected … but my page doesn't not display as expected

Performing system checks...

System check identified no issues (0 silenced).

You have 33 unapplied migration(s). Your project may not work properly until you apply the migrations for app(s): account, accounts, admin, ads, auth, chat, contenttypes, notification, payments, report, sales, sessions, sites, socialaccount.
Run 'python manage.py migrate' to apply them.
May 10, 2022 - 11:41:04
Django version 4.0.4, using settings 'ma_mall.settings.production'
Starting ASGI/Channels version 3.0.4 development server at http://0.0.0.0:8000/
Quit the server with CONTROL-C.

when i visit the page its says enter image description here

searching for the allowed port on the system gave this enter image description here

which clearly shows the the port is now allowed to serve the app

Brian Obot
  • 336
  • 4
  • 16

1 Answers1

0

In Digital Ocean, it is possible that you have a second firewall enabled that can be configured directly on the platform. You can find it under Droplet>Networking. Check if a firewall exists and adjust it for your port. Since two firewalls are a bit cumbersome and pointless, I would recommend using only the Digital Ocean firewalls and disabling ufw permanently via ufw disable.

  • Thank you very much but this is not the case here... I noticed that creating a dummy Django app with django-admin start project and then setting up the allowed hosted and running server with manage.py made the dummy Django welcome page load on my ip:8000 link but once I tried cloning a real project from GitHub and doing the necessary setup it just didn’t serve or respond to requests.. – Brian Obot May 18 '22 at 17:57