Skip to main content
# Django Project Check

Django management command for monitoring file diffs.

## Compatibility

Supports Python 3.12+ and Django 5.2-6.0

## Background

With a large codebase, and a high velocity team making edits, it can be
difficult to keep track of how the codebase is changing over time. A
classic issue is people creating new modules / classes in unexpected
places, or ending up with a set of functions that should be in the same
place but are spread across multiple locations (often resulting in
`import` issues). In order to address this we build a small script to
parse the codebase and dump out a complete listing of all modules,
classes and functions. We commit this to the repo, and then run a CI
check to ensure that it's up to date. The net result is that each PR has
at least one file update which lists which functions have been edited,
and where. It's like a live update to the index.

This pattern - dump a text output and add a CI check to enforce its
correctness - turns out to be a really useful pattern for keeping
control of the codebase, and so we started adding new checks:

- Python functions
- Django URLs
- GraphQL schema
- FSM interactions

The original function check is a python script (using `ast`) and has no
requirement for the Django scaffolding, but the others do, and so they
run as management commands, which are then wrapped with a `git diff`
script:

```yaml
- name: Run freeze_django_urls and check for any uncommitted diff
run: |
python manage.py freeze_django_urls
git diff --exit-code 'django_urls.txt'
```

This project wraps this pattern into a base management command that can
be subclassed for any such requirement. All you need to do is provide a
function that returns the contents to be written to the file.

Metadata

Release files for django-project-checks 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-project-checks 0.5.0
File Size Uploaded
django_project_checks-0.5.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-project-checks 0.5.0
File Interpreter ABI Platform
django_project_checks-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 9.5 kB

Release files / django_project_checks-0.5.0.tar.gz

Download URL django_project_checks-0.5.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2d2388b28c60ccf82c9b02a2168c4f56fd9189ef1802d6a7b241ce9a6659861b
BLAKE2b-256 checksum
How to use checksums
b177642a665ca440b10c911d7d3e387021ead000d7bfa8eb649c0f0eabb1635e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release files / django_project_checks-0.5.0-py3-none-any.whl

Download URL django_project_checks-0.5.0-py3-none-any.whl
Size 5.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0ab55578b6ecabe4c11b3ecd1e215c25577c222d952d0bab856b7dcdf830bfbc
BLAKE2b-256 checksum
How to use checksums
176918059e0380128e99a326904e9fcc97c98477a2c018c8f61f10a4594ce8e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.2

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page