Skip to main content

A simple Django app to integrates with chat.

Project description


django-tawkto is a simple Django app to it integrates with chat.


Python 3.7 to 3.10 supported.

Django 2.2 to 4.0 supported.

Quick start

Install the stable release from pypi (using pip):

pip install django-tawkto

Add tawkto to your INSTALLED_APPS setting like this:



TAWKTO_ID_SITE='<tawkto id site>'

(Optional) Add TAWKTO_API_KEY:

TAWKTO_API_KEY='<tawkto api key>'

(Optional) For secure site (requires TAWKTO_API_KEY):



{% load tawkto_tags %}

<!DOCTYPE html>
<html lang="en">
    {% tawkto_script %}

(Optional) Add visitor name and email:

{% tawkto_script user_name=request.user.get_full_name %}

(Optional) Use a different widget for a given property (default is the default value):

TAWKTO_WIDGET_ID = "default"


{% tawkto_script widget_id='somewidgetid' %}

(Optional) Use a different tawkto property:

{% tawkto_script id_site='tawktosideit' api_key='tawktoapikey'%}

(Optional) Set custom metadata regarding this chat/visitor:

  • is_secure must be True.
  • You must provide a valid email.
  • Metadata is represented by key and value.
  • The key is of the string data type and can contain only alphanumeric characters and ‘-‘ (dash).
  • More in setAttributes section.
def view(request):
    context = {'metadata': {'attr-1': 'value1', 'attr-2': 'value2'}}
    return render(request, 'template.html', context)

In template:

{% tawkto_script is_secure=True extra_attributes=metadata %}


Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

django-tawkto-0.4.1.tar.gz (4.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page