Skip to content
Realtime Django channels implementation for Wagtail content locking
Python JavaScript HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
content_locking Remove bit of test code Sep 9, 2019
pyproject.toml Bump project to 0.1.2 Apr 17, 2019

Wagtail Websockets (WIP)

NOTE: This is a work-in-progress/pre-alpha package, and is mostly intended as a proof of concept.

Library to use django-channels within the context of Wagtail, with the first use-case being content-locking.


  1. Wagtail
  2. Redis


  1. In your Wagtail project, run:
pip install git+
  1. Add channels and content_locking to your INSTALLED_APPS above all the Wagtail imports:
	'content_locking', # Put this before wagtail apps
  1. In your, add the following block:
# The line below references a file we will create in step 4:

# This references a Redis server that you will need to run - the IP address and
# port should match your own server:
    'default': {
        'BACKEND': 'channels_redis.core.RedisChannelLayer',
        'CONFIG': {
            "hosts": [('', 6379)],
  1. Create a file called in your main project folder (e.g. the same folder with
from channels.auth import AuthMiddlewareStack
from channels.routing import ProtocolTypeRouter, URLRouter
from django.urls import path

from content_locking import routing

application = ProtocolTypeRouter(
        "websocket": AuthMiddlewareStack(
You can’t perform that action at this time.