|
1 | | -Welcome to Python.org Website's documentation! |
2 | | -============================================== |
| 1 | +python.org |
| 2 | +========== |
3 | 3 |
|
4 | | -Documentation for the code behind python.org_. |
| 4 | +.. image:: https://github.com/python/pythondotorg/actions/workflows/ci.yml/badge.svg |
| 5 | + :target: https://github.com/python/pythondotorg/actions/workflows/ci.yml |
5 | 6 |
|
6 | | -General information |
7 | | -------------------- |
| 7 | +The codebase behind `python.org <https://www.python.org>`_. It's a Django 5.2 |
| 8 | +application backed by PostgreSQL, Redis, and Celery, with Elasticsearch |
| 9 | +powering site search via Haystack. |
8 | 10 |
|
9 | | -:Source code: https://github.com/python/pythondotorg |
10 | | -:Issue tracker: https://github.com/python/pythondotorg/issues |
11 | | -:Production configuration: https://github.com/python/psf-salt |
12 | | -:GitHub Actions: |
13 | | - .. image:: https://github.com/python/pythondotorg/actions/workflows/ci.yml/badge.svg |
14 | | - :target: https://github.com/python/pythondotorg/actions/workflows/ci.yml |
15 | | -:License: Apache License |
| 11 | +Quick start |
| 12 | +----------- |
| 13 | + |
| 14 | +.. code-block:: bash |
| 15 | +
|
| 16 | + make serve |
| 17 | +
|
| 18 | +Then visit http://localhost:8000. See :doc:`install` for prerequisites and |
| 19 | +full setup instructions. |
| 20 | + |
| 21 | +Make targets |
| 22 | +------------ |
| 23 | + |
| 24 | +:``serve``: Start the full stack (Postgres, Redis, web, worker, static). |
| 25 | +:``test``: Run the test suite. |
| 26 | +:``migrations``: Generate migrations from model changes. |
| 27 | +:``migrate``: Apply pending migrations. |
| 28 | +:``manage <cmd>``: Run any Django management command. |
| 29 | +:``shell``: Open the Django interactive shell. |
| 30 | +:``docker_shell``: Open a bash session inside the web container. |
| 31 | +:``clean``: Tear down containers and reset state. |
| 32 | +:``lint``: Run the ruff linter with ``--fix``. |
| 33 | +:``fmt``: Run the ruff formatter. |
| 34 | +:``ci``: Run lint, fmt, then tests in sequence. |
| 35 | + |
| 36 | +Apps at a glance |
| 37 | +---------------- |
| 38 | + |
| 39 | +**Content & CMS** |
| 40 | + ``pages``, ``blogs``, ``boxes``, ``codesamples``, ``successstories``, |
| 41 | + ``minutes``, ``banners`` |
| 42 | + |
| 43 | +**Community** |
| 44 | + ``events``, ``jobs``, ``community``, ``companies``, ``work_groups`` |
| 45 | + |
| 46 | +**Core** |
| 47 | + ``downloads``, ``sponsors``, ``nominations``, ``users``, ``mailing`` |
| 48 | + |
| 49 | +**Base** |
| 50 | + ``cms`` — shared model mixins (``ContentManageable``, ``NameSlugModel``, |
| 51 | + etc.) used across most apps. |
| 52 | + |
| 53 | +Docker services |
| 54 | +--------------- |
16 | 55 |
|
17 | | -Contents: |
| 56 | +The ``docker-compose.yml`` defines five services: |
| 57 | + |
| 58 | +- **postgres** — PostgreSQL 15.3 database. |
| 59 | +- **redis** — Redis 7 for caching and Celery broker. |
| 60 | +- **web** — Django dev server on port 8000. |
| 61 | +- **worker** — Celery worker with beat scheduler (``django-celery-beat``). |
| 62 | +- **static** — SCSS compilation and static asset pipeline. |
| 63 | + |
| 64 | +Testing & CI |
| 65 | +------------ |
| 66 | + |
| 67 | +Run the full suite: |
| 68 | + |
| 69 | +.. code-block:: bash |
| 70 | +
|
| 71 | + make test |
| 72 | +
|
| 73 | +Run tests for a single app: |
| 74 | + |
| 75 | +.. code-block:: bash |
| 76 | +
|
| 77 | + make manage test events |
| 78 | +
|
| 79 | +CI (GitHub Actions) enforces a 75% coverage minimum and checks for missing |
| 80 | +migrations. See :doc:`contributing` for PR expectations. |
18 | 81 |
|
19 | 82 | .. toctree:: |
20 | 83 | :maxdepth: 2 |
21 | | - :glob: |
| 84 | + :hidden: |
22 | 85 |
|
23 | 86 | install.md |
24 | 87 | contributing |
25 | 88 | administration |
26 | 89 | commands |
27 | 90 |
|
28 | | -Indices and tables |
29 | | -================== |
30 | | - |
31 | | -* :ref:`genindex` |
32 | | - |
33 | | -.. _python.org: https://www.python.org |
| 91 | +:Source code: https://github.com/python/pythondotorg |
| 92 | +:Issue tracker: https://github.com/python/pythondotorg/issues |
| 93 | +:License: Apache License |
0 commit comments