A simple Django app to integrates with https://www.tawk.to/ chat.
Project description
# django-tawkto
django-tawkto is a simple Django app to it integrates with https://www.tawk.to/ chat.
### Quick start
Install the stable release from pypi (using pip):
```bash
pip install django-tawkto
```
Add `tawkto` to your INSTALLED_APPS setting like this:
```python
INSTALLED_APPS = [
...
'tawkto',
]
```
Add `TAWKTO_ID_SITE` in settings.py:
```python
TAWKTO_ID_SITE='<tawkto id site>'
```
(Optional) Add `TAWKTO_API_KEY`:
```python
TAWKTO_API_KEY='<tawkto api key>'
```
(Optional) For secure site (requires `TAWKTO_API_KEY`):
```python
TAWKTO_IS_SECURE=True
```
In HTML:
```djangotemplate
{% load tawkto_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
...
</head>
<body>
...
{% tawkto_script %}
</body>
</html>
```
6. Add visitor `name` and `email`:
```djangotemplate
{% tawkto_script user_name=request.user.get_full_name user_email=request.user.email %}
```
7. Use a different widget for a given property:
```djangotemplate
{% tawkto_script widget_id='somewidgetid' %}
```
django-tawkto is a simple Django app to it integrates with https://www.tawk.to/ chat.
### Quick start
Install the stable release from pypi (using pip):
```bash
pip install django-tawkto
```
Add `tawkto` to your INSTALLED_APPS setting like this:
```python
INSTALLED_APPS = [
...
'tawkto',
]
```
Add `TAWKTO_ID_SITE` in settings.py:
```python
TAWKTO_ID_SITE='<tawkto id site>'
```
(Optional) Add `TAWKTO_API_KEY`:
```python
TAWKTO_API_KEY='<tawkto api key>'
```
(Optional) For secure site (requires `TAWKTO_API_KEY`):
```python
TAWKTO_IS_SECURE=True
```
In HTML:
```djangotemplate
{% load tawkto_tags %}
<!DOCTYPE html>
<html lang="en">
<head>
...
</head>
<body>
...
{% tawkto_script %}
</body>
</html>
```
6. Add visitor `name` and `email`:
```djangotemplate
{% tawkto_script user_name=request.user.get_full_name user_email=request.user.email %}
```
7. Use a different widget for a given property:
```djangotemplate
{% tawkto_script widget_id='somewidgetid' %}
```
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.2.tar.gz
(5.6 kB
view hashes)
Built Distribution
Close
Hashes for django_tawkto-0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3b128576f1b6d45c0559778cc11d295fde6ab08831671d659e83ecddf62b48d |
|
MD5 | e98bf8a9bdbb555eedb2fd6cd09efc86 |
|
BLAKE2b-256 | 941464dbde03d4117e4ffb2479cf1de89d8368f16690541e86f81acf11e4c64e |