Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,4 @@ djangoproject/static/css/*.map
djangoproject/static/css/*.css
# Additional ignores for Docker
.git/
.venv/
48 changes: 44 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@ repos:
- id: end-of-file-fixer
exclude: '(^djangoproject\/static\/js\/lib\/.*$)'
exclude_types: [json, sql]
- id: file-contents-sorter
files: ^(requirements/\w*.txt)$
args: ["--ignore-case"]
- id: fix-byte-order-marker
- id: mixed-line-ending
- id: trailing-whitespace
Expand All @@ -44,7 +41,6 @@ repos:
rev: 25.12.0
hooks:
- id: black
args: ["--target-version=py312"]

- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.7.4
Expand Down Expand Up @@ -73,3 +69,47 @@ repos:
rev: 0.2.2
hooks:
- id: checkmake

- repo: https://github.com/tox-dev/pyproject-fmt
rev: v2.11.1
hooks:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.9.24
hooks:
- name: Check lock file
id: uv-lock
- name: Check requirements/dev.txt
id: uv-export
args:
[
"--frozen",
"--quiet",
"--group",
"dev",
"--output-file=requirements/dev.txt",
"--no-hashes",
]
- name: Check requirements/tests.txt
id: uv-export
args:
[
"--frozen",
"--quiet",
"--group",
"tests",
"--output-file=requirements/tests.txt",
"--no-hashes",
]
- name: Check requirements/prod.txt
id: uv-export
args:
[
"--frozen",
"--quiet",
"--group",
"prod",
"--output-file=requirements/prod.txt",
"--no-hashes",
]
74 changes: 74 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
[project]
name = "djangoproject-com"
version = "0.0.1"
description = "Source code to djangoproject.com"
requires-python = ">=3.12"
classifiers = [
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably don't need these. They're for pypi metadata only I think.

Copy link
Member Author

@ulgens ulgens Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The biggest usecase is PyPI metadata but I think they are useful for communicating what is supported. Can also be used for generating badges: https://shields.io/badges/py-pi-versions-from-framework-classifiers

Python classifiers are pushed by the default pyproject-fmt setup. It can be disabled, but I see no harm.

I can remove them, there is not much benefit, but I'm on the side of keeping them documentation/communication purposes.

"Framework :: Django",
"Framework :: Django :: 6.0",
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"babel==2.17.0",
"django==6.0",
"django-admin-dracula==0.0.3",
"django-contact-form==5.2.0",
"django-countries==8.2.0",
"django-hosts==7.0.0",
"django-money==3.5.4",
"django-push @ git+https://github.com/brutasse/django-push.git@22fda99641cfbd2f3075a723d92652a8e38220a5",
"django-read-only==1.21.0",
"django-recaptcha==4.1.0",
"django-registration-redux==2.13",
"docutils==0.21.2",
"feedparser==6.0.12",
"jinja2==3.1.6",
"libsass==0.23.0",
"markdown==3.10",
"pillow==12.1.0",
"pygments==2.19.2",
"pykismet3==0.1.1",
"python-dateutil==2.9.0.post0",
"requests==2.32.5",
"sorl-thumbnail==12.11.0",
"sphinx==8.1.3",
"stripe==13.2.0",
"time-machine==3.2.0",
]

[dependency-groups]
dev = [
"black==26.1.0", # Used by Django's find_formatters and run_formatters
"django-debug-toolbar==6.1.0",
"prek==0.2.27",
"psycopg[binary]==3.3.2",
"watchdog==6.0.0",
]

prod = [
"gunicorn==23.0.0",
"psycopg[c]==3.3.2",
"redis==7.1.0",
"sentry-sdk==2.49.0",
]

# TODO: Consider merging with dev group
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah I think test & dev are really the same thing.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@django/django-website How do you feel here?

tests = [
"coverage==7.13.1",
"requests-mock==1.12.1",
"tblib==3.2.1",
{ include-group = "dev" },
]

[tool.uv]
package = false
# The earliest version that supports the current lock file revision
required-version = ">=0.8.4"

[tool.pyproject-fmt]
indent = 4
keep_full_version = true
max_supported_python = "3.12"
25 changes: 0 additions & 25 deletions requirements/common.txt

This file was deleted.

153 changes: 150 additions & 3 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,153 @@
-r common.txt
black==26.1.0 # Used by Django's find_formatters and run_formatters
# This file was autogenerated by uv via the following command:
# uv export --frozen --group dev --output-file=requirements/dev.txt --no-hashes
alabaster==1.0.0
# via sphinx
asgiref==3.11.0
# via
# django
# django-countries
babel==2.17.0
# via
# djangoproject-com
# py-moneyed
# sphinx
black==26.1.0
certifi==2026.1.4
# via requests
charset-normalizer==3.4.4
# via requests
click==8.3.1
# via black
colorama==0.4.6 ; sys_platform == 'win32'
# via
# click
# sphinx
django==6.0
# via
# django-admin-dracula
# django-contact-form
# django-debug-toolbar
# django-money
# django-push
# django-read-only
# django-recaptcha
# djangoproject-com
django-admin-dracula==0.0.3
# via djangoproject-com
django-contact-form==5.2.0
# via djangoproject-com
django-countries==8.2.0
# via djangoproject-com
django-debug-toolbar==6.1.0
django-hosts==7.0.0
# via djangoproject-com
django-money==3.5.4
# via djangoproject-com
django-push @ git+https://github.com/brutasse/django-push.git@22fda99641cfbd2f3075a723d92652a8e38220a5
# via djangoproject-com
django-read-only==1.21.0
# via djangoproject-com
django-recaptcha==4.1.0
# via djangoproject-com
django-registration-redux==2.13
# via djangoproject-com
docutils==0.21.2
# via
# djangoproject-com
# sphinx
feedparser==6.0.12
# via djangoproject-com
idna==3.11
# via requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.6
# via
# djangoproject-com
# sphinx
libsass==0.23.0
# via djangoproject-com
markdown==3.10
# via djangoproject-com
markupsafe==3.0.3
# via jinja2
mypy-extensions==1.1.0
# via black
packaging==25.0
# via
# black
# sphinx
pathspec==1.0.3
# via black
pillow==12.1.0
# via djangoproject-com
platformdirs==4.5.1
# via black
prek==0.2.27
psycopg[binary]==3.3.2
psycopg==3.3.2
psycopg-binary==3.3.2 ; implementation_name != 'pypy'
# via psycopg
py-moneyed==3.0
# via django-money
pygments==2.19.2
# via
# djangoproject-com
# sphinx
pykismet3==0.1.1
# via djangoproject-com
python-dateutil==2.9.0.post0
# via djangoproject-com
pytokens==0.3.0
# via black
requests==2.32.5
# via
# django-push
# djangoproject-com
# pykismet3
# sphinx
# stripe
setuptools==80.9.0
# via django-money
sgmllib3k==1.0.0
# via feedparser
six==1.17.0
# via python-dateutil
snowballstemmer==3.0.1
# via sphinx
sorl-thumbnail==12.11.0
# via djangoproject-com
sphinx==8.1.3
# via djangoproject-com
sphinxcontrib-applehelp==2.0.0
# via sphinx
sphinxcontrib-devhelp==2.0.0
# via sphinx
sphinxcontrib-htmlhelp==2.1.0
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==2.0.0
# via sphinx
sphinxcontrib-serializinghtml==2.0.0
# via sphinx
sqlparse==0.5.5
# via
# django
# django-debug-toolbar
stripe==13.2.0
# via djangoproject-com
time-machine==3.2.0
# via djangoproject-com
typing-extensions==4.15.0
# via
# django-countries
# psycopg
# py-moneyed
# stripe
tzdata==2025.3 ; sys_platform == 'win32'
# via
# django
# psycopg
urllib3==2.6.3
# via requests
watchdog==6.0.0
Loading