Skip to content

Commit

Permalink
Fix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
foarsitter committed Oct 27, 2024
1 parent 557a4f9 commit d12c2e7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions {{cookiecutter.project_slug}}/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,27 @@ Moved to [settings](https://cookiecutter-django.readthedocs.io/en/latest/1-getti

- 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.

### Type checks

Running type checks with mypy:

$ mypy {{cookiecutter.project_slug}}
$ uv run mypy {{cookiecutter.project_slug}}

### Test coverage

To run the tests, check your test coverage, and generate an HTML coverage report:

$ coverage run -m pytest
$ coverage html
$ open htmlcov/index.html
$ uv run coverage run -m pytest
$ uv run coverage html
$ uv run open htmlcov/index.html

#### Running tests with pytest

$ pytest
$ uv run pytest

### Live reloading and Sass CSS compilation

Expand All @@ -58,7 +58,7 @@ To run a celery worker:

```bash
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.
Expand All @@ -67,14 +67,14 @@ To run [periodic tasks](https://docs.celeryq.dev/en/stable/userguide/periodic-ta

```bash
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):

```bash
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 %}
Expand Down
4 changes: 2 additions & 2 deletions {{cookiecutter.project_slug}}/docs/howto.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Documentation can be written as rst files in `{{cookiecutter.project_slug}}/docs
{% if cookiecutter.use_docker == 'n' %}
To build and serve docs, use the command::

make livehtml
uv run make livehtml

from inside the `{{cookiecutter.project_slug}}/docs` directory.
{% else %}
Expand All @@ -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:
::

make apidocs
uv run make apidocs

{% if cookiecutter.use_docker == 'y' %}
This can be done in the docker container:
Expand Down

0 comments on commit d12c2e7

Please sign in to comment.