{"id":20285404,"url":"https://github.com/mramshaw/cloud_django_2","last_synced_at":"2026-05-29T01:32:09.727Z","repository":{"id":92905166,"uuid":"224447616","full_name":"mramshaw/Cloud_Django_2","owner":"mramshaw","description":"Django 2 cloudified","archived":false,"fork":false,"pushed_at":"2024-09-04T20:58:01.000Z","size":11,"stargazers_count":0,"open_issues_count":7,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-04T03:44:30.547Z","etag":null,"topics":["django","django2","gunicorn","python","python-3","python3"],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mramshaw.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-11-27T14:21:06.000Z","updated_at":"2020-02-20T16:19:42.000Z","dependencies_parsed_at":"2024-07-10T08:26:14.309Z","dependency_job_id":"4f76b65c-c4ff-4f8a-8970-1e452696c405","html_url":"https://github.com/mramshaw/Cloud_Django_2","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mramshaw/Cloud_Django_2","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FCloud_Django_2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FCloud_Django_2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FCloud_Django_2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FCloud_Django_2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mramshaw","download_url":"https://codeload.github.com/mramshaw/Cloud_Django_2/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mramshaw%2FCloud_Django_2/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33633468,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-05-28T02:00:06.440Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","django2","gunicorn","python","python-3","python3"],"created_at":"2024-11-14T14:26:26.596Z","updated_at":"2026-05-29T01:32:09.711Z","avatar_url":"https://github.com/mramshaw.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Cloud Django_2\n\n[![Known Vulnerabilities](https://snyk.io/test/github/mramshaw/Cloud_Django_2/badge.svg?style=plastic\u0026targetFile=requirements.txt)](https://snyk.io/test/github/mramshaw/Cloud_Django_2?style=plastic\u0026targetFile=requirements.txt)\n\nThis project follows on from my [Writing_Django_2](https://github.com/mramshaw/Writing_Django_2) project, which is a simple Hello World in Django 2 LTS.\n\n[As might be expected, there were breaking changes between Django and Django 2. So rather than upgrade my\n [Cloud_Django](https://github.com/mramshaw/Cloud_Django) repo, it seemed to be a better idea to create\n the __polls__ app in Django 2 and proceed from there, this time with Django 2 LTS.]\n\nIt will use [gunicorn](http://gunicorn.org/) which is a web server for [Django](https://docs.djangoproject.com/en/2.2/howto/deployment/wsgi/gunicorn/).\nSpecifically, it is a [WSGI](https://en.wikipedia.org/wiki/Web_Server_Gateway_Interface) server.\n\nThe plan of attack is as follows:\n\n* [Install and test 'gunicorn'](#gunicorn)\n* [Configure 'gunicorn'](#configure-gunicorn)\n\n## gunicorn\n\nTo install locally:\n\n    $ pip3 install --user gunicorn\n\nOr simply use the `requirements.txt` file:\n\n    $ pip3 install --user -r requirements.txt\n\nVerify the version:\n\n```bash\n$ gunicorn --version\ngunicorn (version 20.0.2)\n$\n```\n\nLets see if it runs (this needs to be in the same folder as `manage.py`):\n\n```bash\n$ cd polls\n$ gunicorn polls.wsgi\n[2019-11-27 09:49:15 -0500] [9766] [INFO] Starting gunicorn 20.0.2\n[2019-11-27 09:49:15 -0500] [9766] [INFO] Listening at: http://127.0.0.1:8000 (9766)\n[2019-11-27 09:49:15 -0500] [9766] [INFO] Using worker: sync\n[2019-11-27 09:49:15 -0500] [9770] [INFO] Booting worker with pid: 9770\n^C[2019-11-27 09:49:16 -0500] [9766] [INFO] Handling signal: int\n[2019-11-27 14:49:17 +0000] [9770] [INFO] Worker exiting (pid: 9770)\n[2019-11-27 09:49:17 -0500] [9766] [INFO] Shutting down: Master\n$\n```\n\n## Configure gunicorn\n\nNow we need to open up `gunicorn` with a `gunicorn.conf.py` file (for some reason,\nthis config file needs to be tagged as a Python file). By default, `gunicorn` runs\nlocally and will only accept local connections. We will configure it to run in\n__promiscuous mode__ (which is a terrible practice, we should really run it behind\na front-end [__nginx__ is recommended], but we can fix this later).\n\nWe will create this file as follows:\n\n```python3\nimport multiprocessing\n\nbind = \"0.0.0.0:8000\"\nworkers = multiprocessing.cpu_count() * 2 - 1\n```\n\nOnce more, with our config file:\n\n```bash\n$ gunicorn -c gunicorn.conf.py polls.wsgi\n[2019-11-27 09:56:41 -0500] [9960] [INFO] Starting gunicorn 20.0.2\n[2019-11-27 09:56:41 -0500] [9960] [INFO] Listening at: http://0.0.0.0:8000 (9960)\n[2019-11-27 09:56:41 -0500] [9960] [INFO] Using worker: sync\n[2019-11-27 09:56:41 -0500] [9965] [INFO] Booting worker with pid: 9965\n[2019-11-27 09:56:41 -0500] [9967] [INFO] Booting worker with pid: 9967\n[2019-11-27 09:56:41 -0500] [9969] [INFO] Booting worker with pid: 9969\n[2019-11-27 09:56:41 -0500] [9970] [INFO] Booting worker with pid: 9970\n[2019-11-27 09:56:41 -0500] [9973] [INFO] Booting worker with pid: 9973\n[2019-11-27 09:56:41 -0500] [9975] [INFO] Booting worker with pid: 9975\n[2019-11-27 09:56:41 -0500] [9976] [INFO] Booting worker with pid: 9976\n^C[2019-11-27 09:57:14 -0500] [9960] [INFO] Handling signal: int\n[2019-11-27 14:57:14 +0000] [9967] [INFO] Worker exiting (pid: 9967)\n[2019-11-27 14:57:14 +0000] [9969] [INFO] Worker exiting (pid: 9969)\n[2019-11-27 14:57:14 +0000] [9965] [INFO] Worker exiting (pid: 9965)\n[2019-11-27 14:57:14 +0000] [9975] [INFO] Worker exiting (pid: 9975)\n[2019-11-27 14:57:14 +0000] [9973] [INFO] Worker exiting (pid: 9973)\n[2019-11-27 14:57:14 +0000] [9970] [INFO] Worker exiting (pid: 9970)\n[2019-11-27 14:57:14 +0000] [9976] [INFO] Worker exiting (pid: 9976)\n[2019-11-27 09:57:14 -0500] [9960] [INFO] Shutting down: Master\n$\n```\n\nOkay, everything runs.\n\n## To Do\n\n- [x] Add a badge for `Black` formatting style\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmramshaw%2Fcloud_django_2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmramshaw%2Fcloud_django_2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmramshaw%2Fcloud_django_2/lists"}