{"id":16697565,"url":"https://github.com/armcknight/django-hello-world","last_synced_at":"2025-03-14T03:23:48.552Z","repository":{"id":44195890,"uuid":"150493161","full_name":"armcknight/django-hello-world","owner":"armcknight","description":"A simple Hello, World! server app using Django.","archived":false,"fork":false,"pushed_at":"2022-12-08T05:45:55.000Z","size":195,"stargazers_count":0,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-20T22:31:59.573Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/armcknight.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-26T21:37:48.000Z","updated_at":"2021-05-25T21:46:56.000Z","dependencies_parsed_at":"2023-01-24T14:15:51.147Z","dependency_job_id":null,"html_url":"https://github.com/armcknight/django-hello-world","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armcknight%2Fdjango-hello-world","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armcknight%2Fdjango-hello-world/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armcknight%2Fdjango-hello-world/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/armcknight%2Fdjango-hello-world/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/armcknight","download_url":"https://codeload.github.com/armcknight/django-hello-world/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243516276,"owners_count":20303409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-10-12T17:48:17.357Z","updated_at":"2025-03-14T03:23:48.515Z","avatar_url":"https://github.com/armcknight.png","language":"Python","funding_links":["https://www.paypal.me/armcknight"],"categories":[],"sub_categories":[],"readme":"# django-hello-world\n\n## Create from scratch\n\n### Requirements\n\n- [git](https://git-scm.com)\n- [homebrew](https://brew.sh)\n- [python](https://www.python.org)\n- [pip](https://pip.pypa.io/en/stable/)\n- [pipenv](https://github.com/pypa/pipenv)\n- [heroku cli](https://devcenter.heroku.com/articles/heroku-cli)\n\n\u003e Note: everything after homebrew should be installable via `brew install python pipenv heroku-cli`\n\n```sh\n# set up python dev environment\npipenv --three\npipenv install django django-heroku gunicorn\npipenv shell\n\n# create the django project and app\ndjango-admin startproject mysite\npushd mysite\npython manage.py startapp myapp\npopd\n\n# create the Hello World! view\necho \"from django.http import HttpResponse\ndef index(request):\n    return HttpResponse('Hello, world!')\" \u003e mysite/myapp/views.py\n\n# add the app route\necho \"from django.urls import path\nfrom . import views\nurlpatterns = [\n    path('', views.index, name='index'),\n]\" \u003e mysite/myapp/urls.py\n\n# add django_heroku settings\necho \"import django_heroku\ndjango_heroku.settings(locals())\" \u003e\u003e mysite/mysite/settings.py\n\n# update main project routes to direct towards app\nsed -i '' 's/from django.urls import path/from django.urls import include, path/g' mysite/mysite/urls.py\nsed -i '' 's/urlpatterns = \\[/urlpatterns = \\[\\\n    path(\\'\\', include(\\'myapp.urls\\')),/g' mysite/mysite/urls.py\n\n# wrap dependencies for Heroku\npip freeze \u003e requirements.txt\n\n# create Procfile for Heroku\necho 'web: gunicorn --pythonpath mysite mysite.wsgi' \u003e Procfile # Heroku expects the project to be at root level. `--pythyonpath` allows it to be in a specified subdirectory path.\n\n# ignore the default sqlite database and python bytecode\necho \"mysite/db.sqlite3\n*.pyc\" \u003e .gitignore\n```\n\n## Deployment\n\n### Local\n\n```sh\npipenv shell\npython mysite/manage.py runserver\nopen http://localhost:8000\n```\n\n### Locally with Heroku:\n\n```sh\nheroku local\nopen http://localhost:5000\n```\n\n## Deploying to Heroku\n\n```sh\nheroku create # make sure your ‘heroku’ git remote points to the correct app's git url, like if there was a previous one\ngit push heroku master\nheroku open\n```\n\n## References\n\n- [Writing your first Django app, part 1](https://docs.djangoproject.com/en/2.1/intro/tutorial01/)\n- [Configuring Django Apps for Heroku](https://devcenter.heroku.com/articles/django-app-configuration)\n\n\u003e Note: References preserved as PDFs in `docs/`.\n\n# Contribute\n\nIssues and pull requests are welcome! \n\nIf this project helped you, please consider \u003ca href=\"https://www.paypal.me/armcknight\"\u003eleaving a tip\u003c/a\u003e 🤗\n\nDo you need help with a project? [I'm currently available for hire or contract.](http://tworingsoft.com/contracts).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmcknight%2Fdjango-hello-world","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farmcknight%2Fdjango-hello-world","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farmcknight%2Fdjango-hello-world/lists"}