1. Home
  2. Integrations
  3. Django

AI chatbot for Django: how to install it

In Django the code goes in the base template, which every page inherits.

You’ll find it ready in the panel, with your key, and copy it in one click. It looks like this:

<script src="https://app.interlyo.com/widget/chatbot.js" data-api-key="your-key" defer></script>

In the base template

  1. Define INTERLYO_API_KEY in settings.py and pass it to your templates with a context processor.
  2. Open templates/base.html.
  3. Paste the code before </body>.
  {% block content %}{% endblock %}

  <script src="https://app.interlyo.com/widget/chatbot.js" data-api-key="{{ INTERLYO_API_KEY }}" defer></script>
</body>

Load chatbot.js from our address, as in the code above. Don’t download it into your project, rename it or include it in your site’s bundle: the widget would no longer find the key and our server.

Ready to install it?

Sign up free and the panel gives you the code and instructions for your platform.