{"id":19557466,"url":"https://github.com/impfundev/django-vercel-stater","last_synced_at":"2026-06-09T22:31:17.362Z","repository":{"id":245836627,"uuid":"819314145","full_name":"impfundev/django-vercel-stater","owner":"impfundev","description":null,"archived":false,"fork":false,"pushed_at":"2024-06-24T10:33:50.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-11-19T22:18:53.609Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://django-vercel-stater.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/impfundev.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":"2024-06-24T09:01:59.000Z","updated_at":"2024-06-24T10:33:53.000Z","dependencies_parsed_at":"2024-06-24T12:04:13.457Z","dependency_job_id":"98ffe6ad-310b-4821-90dd-7121831ed3b0","html_url":"https://github.com/impfundev/django-vercel-stater","commit_stats":null,"previous_names":["impfundev/django-vercel-stater"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/impfundev/django-vercel-stater","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impfundev%2Fdjango-vercel-stater","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impfundev%2Fdjango-vercel-stater/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impfundev%2Fdjango-vercel-stater/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impfundev%2Fdjango-vercel-stater/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/impfundev","download_url":"https://codeload.github.com/impfundev/django-vercel-stater/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/impfundev%2Fdjango-vercel-stater/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34129072,"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-06-09T02:00:06.510Z","response_time":63,"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":[],"created_at":"2024-11-11T04:42:36.341Z","updated_at":"2026-06-09T22:31:17.319Z","avatar_url":"https://github.com/impfundev.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%2Fimpfundev%2Fdjango-vercel-stater","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fimpfundev%2Fdjango-vercel-stater","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fimpfundev%2Fdjango-vercel-stater/lists"}