A Django template for Render
Caution
This project is currently under development, don't deploy if you this notice
Warning
Render Workflows does not support Blueprint, you will have to follow the documented steps to register your Workflow worker.
This is a sample Django project that demonstrates the use of Render technologies inside of the Django context. In particular it seeks to demonstrate:
- Settings for development and deployment into Render
- Workflow Tasks accessing the Django ORM
- A Django management command that can trigger the worker
We also include:
- A minimal
blueprintto deploy this project to Render - Instructions for running the project locally
direnv automatically loads and unloads environment variables from your .envrc file on your current directory. Install this via brew:
brew install direnvUse this template for a .envrc file and adjust the values as needed.
export DJANGO_SETTINGS_MODULE=rango.settings.dev
export POSTGRES_DB=django
export POSTGRES_HOST=localhost
export POSTGRES_USER=postgres
export POSTGRES_PASSWORD=postgres
export POSTGRES_PORT=5432Each time you modify .envrc, run direnv allow to reload the environment variables.
We use uv to manage Python dependencies. Install it and sync the dependencies:
brew install uv
uv syncTaskfile is a cross-platform task runner and builder tool. Install it via brew and use it to run tasks defined in Taskfile.yaml.
brew install go-task/tap/go-task
brew install go-task
task # will show you the available tasksMake sure you create a databae for your project and GRANT the necessary privileges to the postgres user.
CREATE DATABASE django;
GRANT ALL PRIVILEGES ON DATABASE django TO postgres;
You will require the Render CLI to assist with your developing Render Workflows, install it with the handy brew command below.
brew install renderFor giggles I called the Django app rango (Render and Django, also a western comedy film)
rango/- the Django appbusybee- the app where I have the workflow implemented