The codebase behind python.org. It's a Django 5.2 application backed by PostgreSQL, Redis, and Celery, with Elasticsearch powering site search via Haystack.
make serveThen visit http://localhost:8000. See :doc:`install` for prerequisites and full setup instructions.
serve: | Start the full stack (Postgres, Redis, web, worker, static). |
|---|---|
test: | Run the test suite. |
migrations: | Generate migrations from model changes. |
migrate: | Apply pending migrations. |
manage <cmd>: | Run any Django management command. |
shell: | Open the Django interactive shell. |
docker_shell: | Open a bash session inside the web container. |
clean: | Tear down containers and reset state. |
lint: | Run the ruff linter with --fix. |
fmt: | Run the ruff formatter. |
ci: | Run lint, fmt, then tests in sequence. |
- Content & CMS
pages,blogs,boxes,codesamples,successstories,minutes,banners- Community
events,jobs,community,companies,work_groups- Core
downloads,sponsors,nominations,users,mailing- Base
cms— shared model mixins (ContentManageable,NameSlugModel, etc.) used across most apps.
The docker-compose.yml defines five services:
- postgres — PostgreSQL 15.3 database.
- redis — Redis 7 for caching and Celery broker.
- web — Django dev server on port 8000.
- worker — Celery worker with beat scheduler (
django-celery-beat). - static — SCSS compilation and static asset pipeline.
Run the full suite:
make testRun tests for a single app:
make manage test eventsCI (GitHub Actions) enforces a 75% coverage minimum and checks for missing migrations. See :doc:`contributing` for PR expectations.
.. toctree:: :maxdepth: 2 :hidden: install.md contributing administration commands
| Source code: | https://github.com/python/pythondotorg |
|---|---|
| Issue tracker: | https://github.com/python/pythondotorg/issues |
| License: | Apache License |