File: django.md

package info (click to toggle)
python-rq 2.3.3-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 2,428 kB
  • sloc: python: 12,349; makefile: 22; sh: 19
file content (23 lines) | stat: -rw-r--r-- 670 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
---
title: "RQ: Using with Django"
layout: patterns
---

## Using RQ with Django

The simplest way of using RQ with Django is to use
[django-rq](https://github.com/ui/django-rq).  Follow the instructions in the
README.

### Manually

In order to use RQ together with Django, you have to start the worker in
a "Django context".  Possibly, you have to write a custom Django management
command to do so.  In many cases, however, setting the `DJANGO_SETTINGS_MODULE`
environmental variable will already do the trick.

If `settings.py` is your Django settings file (as it is by default), use this:

```console
$ DJANGO_SETTINGS_MODULE=settings rq worker high default low
```