Skip to content

Instantly share code, notes, and snippets.

@adamghill
Last active August 16, 2025 14:21
Show Gist options
  • Save adamghill/9b2f91ab98e4bec36eecea534e82375a to your computer and use it in GitHub Desktop.
Save adamghill/9b2f91ab98e4bec36eecea534e82375a to your computer and use it in GitHub Desktop.
Some default `just` commands for Django projects

just manage

# Manage
manage *ARGS='':
  uv run --all-extras python3 manage.py {{ ARGS }}

just run

# Run the development server
run port='8000':
  just manage runserver 0:{{ port }}

just bake

# Make database migrations
bake:
  just manage makemigrations

just migrate

# Run database migrations
migrate *ARGS='':
  just manage migrate {{ ARGS }}

just dance

# Do the migration dance (make migrations and migrate them)
dance:
  just bake
  just migrate

just test

# Run the tests
test *ARGS='':
  -uv run --all-extras pytest {{ ARGS }}

just lint

# Lint the project
lint *ARGS='.':
  -uvx ruff check {{ ARGS }}

just type

# Check the types in the project
type *ARGS='.':
  -uv run --all-extras mypy {{ ARGS }}  # need to run through uv to see installed dependencies

just coverage

# Run coverage on the code
coverage:
  -uv run --all-extras pytest --cov={{ src }}

just develop

# Run all the dev things
develop:
  just lint
  just type
  just coverage
@adamghill
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment