-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added TAWKTO_EXCLUDE_SUPERUSERS config
- Loading branch information
1 parent
0ba3dbf
commit 5fdc3e9
Showing
6 changed files
with
51 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<!--Start of Tawk.to Script--> | ||
{{ tawkto_data|json_script:"tawkto_data" }} | ||
<script type="text/javascript"> | ||
const TawkData = JSON.parse(document.getElementById("tawkto_data").innerText); | ||
window.Tawk_API = window.Tawk_API || {}; | ||
window.Tawk_LoadStart = new Date(); | ||
|
||
if (TawkData.visitor.name || TawkData.visitor.email) { | ||
window.Tawk_API.visitor = TawkData.visitor; | ||
} | ||
|
||
if (TawkData.is_secure && TawkData.visitor.email && TawkData.extra_attributes) { | ||
window.Tawk_API.onLoad = function(){ | ||
window.Tawk_API.setAttributes(TawkData.extra_attributes, function(error){ | ||
if (error) { | ||
console.log("setAttributes API error", error); | ||
} | ||
}); | ||
}; | ||
} | ||
|
||
(function () { | ||
var s1 = document.createElement("script"); | ||
var s0 = document.getElementsByTagName("script")[0]; | ||
s1.async = true; | ||
s1.src = TawkData.url; | ||
s1.charset = "UTF-8"; | ||
s1.setAttribute("crossorigin", "*"); | ||
s0.parentNode.insertBefore(s1, s0); | ||
})(); | ||
</script> | ||
<!--End of Tawk.to Script--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,3 @@ | ||
<!--Start of Tawk.to Script--> | ||
{{ tawkto_data|json_script:"tawkto_data" }} | ||
<script type="text/javascript"> | ||
const TawkData = JSON.parse(document.getElementById("tawkto_data").innerText); | ||
window.Tawk_API = window.Tawk_API || {}; | ||
window.Tawk_LoadStart = new Date(); | ||
|
||
if (TawkData.visitor.name || TawkData.visitor.email) { | ||
window.Tawk_API.visitor = TawkData.visitor; | ||
} | ||
|
||
if (TawkData.is_secure && TawkData.visitor.email && TawkData.extra_attributes) { | ||
window.Tawk_API.onLoad = function(){ | ||
window.Tawk_API.setAttributes(TawkData.extra_attributes, function(error){ | ||
if (error) { | ||
console.log("setAttributes API error", error); | ||
} | ||
}); | ||
}; | ||
} | ||
|
||
(function () { | ||
var s1 = document.createElement("script"); | ||
var s0 = document.getElementsByTagName("script")[0]; | ||
s1.async = true; | ||
s1.src = TawkData.url; | ||
s1.charset = "UTF-8"; | ||
s1.setAttribute("crossorigin", "*"); | ||
s0.parentNode.insertBefore(s1, s0); | ||
})(); | ||
</script> | ||
<!--End of Tawk.to Script--> | ||
{% if not exclude_superusers %} | ||
{% include 'tawkto/templatetags/_script.html' with tawkto_data=tawkto_data only %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
from django.urls import path | ||
|
||
from app.views import test_view | ||
from django.contrib import admin | ||
from django.urls import path | ||
|
||
urlpatterns = [ | ||
path("admin/", admin.site.urls), | ||
path("", test_view), | ||
] |