|
1 | | -run: |
2 | | - uv run manage.py runserver 0.0.0.0:8000 |
| 1 | +sync: ## Makes your locally installed packages match the ones specified in `pyproject.toml`. |
| 2 | + uv sync --group dev |
3 | 3 |
|
4 | | -migrations: |
5 | | - uv run manage.py makemigrations ${A} |
| 4 | +manage: ## Runs the Django management command specified by passing `args`. |
| 5 | + uv run $(uv_args) manage.py $(args) |
6 | 6 |
|
7 | | -migrate: |
8 | | - uv run manage.py migrate |
| 7 | +shell: ## Enters a Django shell, with most common classes automatically imported. |
| 8 | + make manage args="shell_plus" |
9 | 9 |
|
10 | | -superuser: |
11 | | - uv run manage.py createsuperuser |
| 10 | +migrate: ## Updates the database schema from the migration files. |
| 11 | + make manage args="migrate $(args)" |
12 | 12 |
|
13 | | -startapp: |
14 | | - uv run manage.py startapp |
| 13 | +makemigrations: ## Creates migration files from the models, if there are any changes. |
| 14 | + make manage args="makemigrations $(args)" |
15 | 15 |
|
16 | | -shell: |
17 | | - uv run manage.py shell |
| 16 | +makemessages: ## Extracts all translatable strings from the codebase and updates the `.po` files with them. |
| 17 | + make manage args="makemessages $(args)" |
18 | 18 |
|
19 | | -test: |
20 | | - uv run manage.py test |
| 19 | +makemessages-all: ## Runs `makemessages` for all languages and domains. |
| 20 | + make makemessages args="-a" |
| 21 | + make makemessages args="-a -d djangojs" |
| 22 | + |
| 23 | +compilemessages: ## Updates the `.mo` files from the `.po` files. |
| 24 | + make manage args="compilemessages $(args)" |
| 25 | + |
| 26 | +collectstatic: ## "Compiles" the static files (CSS and JS files, images, etc.) into the `STATIC_ROOT` folder. |
| 27 | + make manage args="collectstatic --no-input" |
| 28 | + |
| 29 | +update: ## Updates the installed packages, database and static files. |
| 30 | + make sync |
| 31 | + make migrate |
| 32 | + make collectstatic |
| 33 | + |
| 34 | +createsuperuser: ## Creates a superuser. |
| 35 | + make manage args="createsuperuser" |
| 36 | + |
| 37 | +start: ## Starts the Django webserver. |
| 38 | + make manage args="runserver $(args)" |
| 39 | + |
| 40 | +test: ## Runs the test suite. Pass extra arguments with `args`, e.g. `args="-k 'test_function'"`. |
| 41 | + make manage args="test $(args)" |
0 commit comments