mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2025-08-15 01:14:53 +03:00
Merge branch 'cookiecutter:master' into master
This commit is contained in:
commit
69d687037d
21
CHANGELOG.md
21
CHANGELOG.md
|
@ -3,6 +3,27 @@ All enhancements and patches to Cookiecutter Django will be documented in this f
|
|||
|
||||
<!-- GENERATOR_PLACEHOLDER -->
|
||||
|
||||
## 2023.01.12
|
||||
|
||||
### Updated
|
||||
- Update sentry-sdk to 1.13.0 ([#4074](https://github.com/cookiecutter/cookiecutter-django/pull/4074))
|
||||
|
||||
## 2023.01.11
|
||||
|
||||
### Changed
|
||||
- Update Celery instructions in the documentation ([#4061](https://github.com/cookiecutter/cookiecutter-django/pull/4061))
|
||||
### Updated
|
||||
- Update tox to 4.2.7 ([#4073](https://github.com/cookiecutter/cookiecutter-django/pull/4073))
|
||||
|
||||
## 2023.01.10
|
||||
|
||||
### Changed
|
||||
- Add dump.rdb to gitignore ([#4062](https://github.com/cookiecutter/cookiecutter-django/pull/4062))
|
||||
### Fixed
|
||||
- Exclude `.venv` from code style checks ([#4069](https://github.com/cookiecutter/cookiecutter-django/pull/4069))
|
||||
### Updated
|
||||
- Update hiredis to 2.1.1 ([#4070](https://github.com/cookiecutter/cookiecutter-django/pull/4070))
|
||||
|
||||
## 2023.01.08
|
||||
|
||||
### Updated
|
||||
|
|
|
@ -141,15 +141,32 @@ In production, we have Mailgun_ configured to have your back!
|
|||
Celery
|
||||
------
|
||||
|
||||
If the project is configured to use Celery as a task scheduler then by default tasks are set to run on the main thread
|
||||
when developing locally. If you have the appropriate setup on your local machine then set the following
|
||||
in ``config/settings/local.py``::
|
||||
If the project is configured to use Celery as a task scheduler then, by default, tasks are set to run on the main thread when developing locally instead of getting sent to a broker. However, if you have Redis setup on your local machine, you can set the following in ``config/settings/local.py``::
|
||||
|
||||
CELERY_TASK_ALWAYS_EAGER = False
|
||||
|
||||
To run Celery locally, make sure redis-server is installed (instructions are available at https://redis.io/topics/quickstart), run the server in one terminal with `redis-server`, and then start celery in another terminal with the following command::
|
||||
Next, make sure `redis-server` is installed (per the `Getting started with Redis`_ guide) and run the server in one terminal::
|
||||
|
||||
celery -A config.celery_app worker --loglevel=info
|
||||
$ redis-server
|
||||
|
||||
Start the Celery worker by running the following command in another terminal::
|
||||
|
||||
$ celery -A config.celery_app worker --loglevel=info
|
||||
|
||||
That Celery worker should be running whenever your app is running, typically as a background process,
|
||||
so that it can pick up any tasks that get queued. Learn more from the `Celery Workers Guide`_.
|
||||
|
||||
The project comes with a simple task for manual testing purposes, inside `<project_slug>/users/tasks.py`. To queue that task locally, start the Django shell, import the task, and call `delay()` on it::
|
||||
|
||||
$ python manage.py shell
|
||||
>> from <project_slug>.users.tasks import get_users_count
|
||||
>> get_users_count.delay()
|
||||
|
||||
You can also use Django admin to queue up tasks, thanks to the `django-celerybeat`_ package.
|
||||
|
||||
.. _Getting started with Redis guide: https://redis.io/docs/getting-started/
|
||||
.. _Celery Workers Guide: https://docs.celeryq.dev/en/stable/userguide/workers.html
|
||||
.. _django-celerybeat: https://django-celery-beat.readthedocs.io/en/latest/
|
||||
|
||||
|
||||
Sass Compilation & Live Reloading
|
||||
|
|
|
@ -12,7 +12,7 @@ pre-commit==2.21.0
|
|||
|
||||
# Testing
|
||||
# ------------------------------------------------------------------------------
|
||||
tox==4.2.6
|
||||
tox==4.2.7
|
||||
pytest==7.2.0
|
||||
pytest-cookies==0.6.1
|
||||
pytest-instafail==0.4.2
|
||||
|
|
2
setup.py
2
setup.py
|
@ -5,7 +5,7 @@ except ImportError:
|
|||
from distutils.core import setup
|
||||
|
||||
# We use calendar versioning
|
||||
version = "2023.01.08"
|
||||
version = "2023.01.12"
|
||||
|
||||
with open("README.rst") as readme_file:
|
||||
long_description = readme_file.read()
|
||||
|
|
3
{{cookiecutter.project_slug}}/.gitignore
vendored
3
{{cookiecutter.project_slug}}/.gitignore
vendored
|
@ -326,6 +326,9 @@ Session.vim
|
|||
# Auto-generated tag files
|
||||
tags
|
||||
|
||||
# Redis dump file
|
||||
dump.rdb
|
||||
|
||||
### Project template
|
||||
{%- if cookiecutter.use_mailhog == 'y' and cookiecutter.use_docker == 'n' %}
|
||||
MailHog
|
||||
|
|
|
@ -8,7 +8,7 @@ psycopg2==2.9.5 # https://github.com/psycopg/psycopg2
|
|||
Collectfast==2.2.0 # https://github.com/antonagestam/collectfast
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_sentry == "y" %}
|
||||
sentry-sdk==1.12.1 # https://github.com/getsentry/sentry-python
|
||||
sentry-sdk==1.13.0 # https://github.com/getsentry/sentry-python
|
||||
{%- endif %}
|
||||
{%- if cookiecutter.use_docker == "n" and cookiecutter.windows == "y" %}
|
||||
hiredis==2.1.1 # https://github.com/redis/hiredis-py
|
||||
|
|
Loading…
Reference in New Issue
Block a user