{"id":21509095,"url":"https://github.com/tooniez/django-vercel","last_synced_at":"2026-04-14T14:33:16.161Z","repository":{"id":258916725,"uuid":"853100441","full_name":"tooniez/django-vercel","owner":"tooniez","description":"📚 A Django application hosted on Vercel","archived":false,"fork":false,"pushed_at":"2025-06-06T23:25:38.000Z","size":16,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-07-20T08:29:19.507Z","etag":null,"topics":["django","python","vercel"],"latest_commit_sha":null,"homepage":"https://django-vercel-one-chi.vercel.app","language":"Python","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/tooniez.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,"zenodo":null}},"created_at":"2024-09-06T01:55:51.000Z","updated_at":"2025-05-10T00:55:40.000Z","dependencies_parsed_at":"2025-07-20T08:35:14.801Z","dependency_job_id":null,"html_url":"https://github.com/tooniez/django-vercel","commit_stats":null,"previous_names":["tooniez/django-vercel"],"tags_count":0,"template":true,"template_full_name":null,"purl":"pkg:github/tooniez/django-vercel","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Fdjango-vercel","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Fdjango-vercel/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Fdjango-vercel/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Fdjango-vercel/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tooniez","download_url":"https://codeload.github.com/tooniez/django-vercel/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tooniez%2Fdjango-vercel/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31801401,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-14T11:13:53.975Z","status":"ssl_error","status_checked_at":"2026-04-14T11:13:53.299Z","response_time":153,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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","python","vercel"],"created_at":"2024-11-23T21:18:11.519Z","updated_at":"2026-04-14T14:33:16.143Z","avatar_url":"https://github.com/tooniez.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fpython%2Fdjango\u0026demo-title=Django%20%2B%20Vercel\u0026demo-description=Use%20Django%204%20on%20Vercel%20with%20Serverless%20Functions%20using%20the%20Python%20Runtime.\u0026demo-url=https%3A%2F%2Fdjango-template.vercel.app%2F\u0026demo-image=https://assets.vercel.com/image/upload/v1669994241/random/django.png)\n\n# Django + Vercel\n\nThis example shows how to use Django 4 on Vercel with Serverless Functions using the [Python Runtime](https://vercel.com/docs/concepts/functions/serverless-functions/runtimes/python).\n\n## Demo\n\nhttps://django-template.vercel.app/\n\n## How it Works\n\nOur Django application, `example` is configured as an installed application in `api/settings.py`:\n\n```python\n# api/settings.py\nINSTALLED_APPS = [\n    # ...\n    'example',\n]\n```\n\nWe allow \"\\*.vercel.app\" subdomains in `ALLOWED_HOSTS`, in addition to 127.0.0.1:\n\n```python\n# api/settings.py\nALLOWED_HOSTS = ['127.0.0.1', '.vercel.app']\n```\n\nThe `wsgi` module must use a public variable named `app` to expose the WSGI application:\n\n```python\n# api/wsgi.py\napp = get_wsgi_application()\n```\n\nThe corresponding `WSGI_APPLICATION` setting is configured to use the `app` variable from the `api.wsgi` module:\n\n```python\n# api/settings.py\nWSGI_APPLICATION = 'api.wsgi.app'\n```\n\nThere is a single view which renders the current time in `example/views.py`:\n\n```python\n# example/views.py\nfrom datetime import datetime\n\nfrom django.http import HttpResponse\n\n\ndef index(request):\n    now = datetime.now()\n    html = f'''\n    \u003chtml\u003e\n        \u003cbody\u003e\n            \u003ch1\u003eHello from Vercel!\u003c/h1\u003e\n            \u003cp\u003eThe current time is { now }.\u003c/p\u003e\n        \u003c/body\u003e\n    \u003c/html\u003e\n    '''\n    return HttpResponse(html)\n```\n\nThis view is exposed a URL through `example/urls.py`:\n\n```python\n# example/urls.py\nfrom django.urls import path\n\nfrom example.views import index\n\n\nurlpatterns = [\n    path('', index),\n]\n```\n\nFinally, it's made accessible to the Django server inside `api/urls.py`:\n\n```python\n# api/urls.py\nfrom django.urls import path, include\n\nurlpatterns = [\n    ...\n    path('', include('example.urls')),\n]\n```\n\nThis example uses the Web Server Gateway Interface (WSGI) with Django to enable handling requests on Vercel with Serverless Functions.\n\n## Running Locally\n\n```bash\npython manage.py runserver\n```\n\nYour Django application is now available at `http://localhost:8000`.\n\n## One-Click Deploy\n\nDeploy the example using [Vercel](https://vercel.com?utm_source=github\u0026utm_medium=readme\u0026utm_campaign=vercel-examples):\n\n[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/new/clone?repository-url=https%3A%2F%2Fgithub.com%2Fvercel%2Fexamples%2Ftree%2Fmain%2Fpython%2Fdjango\u0026demo-title=Django%20%2B%20Vercel\u0026demo-description=Use%20Django%204%20on%20Vercel%20with%20Serverless%20Functions%20using%20the%20Python%20Runtime.\u0026demo-url=https%3A%2F%2Fdjango-template.vercel.app%2F\u0026demo-image=https://assets.vercel.com/image/upload/v1669994241/random/django.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftooniez%2Fdjango-vercel","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftooniez%2Fdjango-vercel","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftooniez%2Fdjango-vercel/lists"}