This commit is contained in:
Jelmer Draaijer 2024-10-26 18:37:57 +02:00
parent 557a4f9e84
commit d12c2e7625
2 changed files with 11 additions and 11 deletions

View File

@ -22,7 +22,7 @@ Moved to [settings](https://cookiecutter-django.readthedocs.io/en/latest/1-getti
- To create a **superuser account**, use this command: - To create a **superuser account**, use this command:
$ python manage.py createsuperuser $ uv run python manage.py createsuperuser
For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users. For convenience, you can keep your normal user logged in on Chrome and your superuser logged in on Firefox (or similar), so that you can see how the site behaves for both kinds of users.
@ -30,19 +30,19 @@ For convenience, you can keep your normal user logged in on Chrome and your supe
Running type checks with mypy: Running type checks with mypy:
$ mypy {{cookiecutter.project_slug}} $ uv run mypy {{cookiecutter.project_slug}}
### Test coverage ### Test coverage
To run the tests, check your test coverage, and generate an HTML coverage report: To run the tests, check your test coverage, and generate an HTML coverage report:
$ coverage run -m pytest $ uv run coverage run -m pytest
$ coverage html $ uv run coverage html
$ open htmlcov/index.html $ uv run open htmlcov/index.html
#### Running tests with pytest #### Running tests with pytest
$ pytest $ uv run pytest
### Live reloading and Sass CSS compilation ### Live reloading and Sass CSS compilation
@ -58,7 +58,7 @@ To run a celery worker:
```bash ```bash
cd {{cookiecutter.project_slug}} cd {{cookiecutter.project_slug}}
celery -A config.celery_app worker -l info uv run celery -A config.celery_app worker -l info
``` ```
Please note: For Celery's import magic to work, it is important _where_ the celery commands are run. If you are in the same folder with _manage.py_, you should be right. Please note: For Celery's import magic to work, it is important _where_ the celery commands are run. If you are in the same folder with _manage.py_, you should be right.
@ -67,14 +67,14 @@ To run [periodic tasks](https://docs.celeryq.dev/en/stable/userguide/periodic-ta
```bash ```bash
cd {{cookiecutter.project_slug}} cd {{cookiecutter.project_slug}}
celery -A config.celery_app beat uv run celery -A config.celery_app beat
``` ```
or you can embed the beat service inside a worker with the `-B` option (not recommended for production use): or you can embed the beat service inside a worker with the `-B` option (not recommended for production use):
```bash ```bash
cd {{cookiecutter.project_slug}} cd {{cookiecutter.project_slug}}
celery -A config.celery_app worker -B -l info uv run celery -A config.celery_app worker -B -l info
``` ```
{%- endif %} {%- endif %}

View File

@ -9,7 +9,7 @@ Documentation can be written as rst files in `{{cookiecutter.project_slug}}/docs
{% if cookiecutter.use_docker == 'n' %} {% if cookiecutter.use_docker == 'n' %}
To build and serve docs, use the command:: To build and serve docs, use the command::
make livehtml uv run make livehtml
from inside the `{{cookiecutter.project_slug}}/docs` directory. from inside the `{{cookiecutter.project_slug}}/docs` directory.
{% else %} {% else %}
@ -35,7 +35,7 @@ For an in-use example, see the `page source <_sources/users.rst.txt>`_ for :ref:
To compile all docstrings automatically into documentation source files, use the command: To compile all docstrings automatically into documentation source files, use the command:
:: ::
make apidocs uv run make apidocs
{% if cookiecutter.use_docker == 'y' %} {% if cookiecutter.use_docker == 'y' %}
This can be done in the docker container: This can be done in the docker container: