Django Sweet Alerts

Pro Component

Our Django Sweet Alerts are beautiful, responsive, customisable, accessible replacements for Javascript’s popup boxes.
Keep reading our Django Alerts examples and learn how to use this plugin.



In order to use this plugin on your page you will need to include the following styles in the “Page plugins” area from the page’s head section:

<link rel="stylesheet" href="assets/vendor/sweetalert2/dist/sweetalert2.min.css">


In order to use this plugin on your page you will need to include the following script in the “Optional JS” area from the page’s footer:

<script src="assets/vendor/sweetalert2/dist/sweetalert2.min.js"></script>


SweetAlert2 automatically centers itself on the page and looks great no matter if you’re using a desktop computer, mobile or tablet. It’s even highly customizeable, as you can see below!


<button class="btn btn-primary" data-toggle="sweet-alert" data-sweet-alert="basic">Basic alert</button>
<button class="btn btn-info" data-toggle="sweet-alert" data-sweet-alert="info">Info alert</button>
<button class="btn btn-success" data-toggle="sweet-alert" data-sweet-alert="success">Success alert</button>
<button class="btn btn-warning" data-toggle="sweet-alert" data-sweet-alert="warning">Warning alert</button>
<button class="btn btn-default" data-toggle="sweet-alert" data-sweet-alert="question">Question</button>


<button class="btn btn-primary" data-toggle="sweet-alert" data-sweet-alert="confirm">Confim alert</button>
<button class="btn btn-primary" data-toggle="sweet-alert" data-sweet-alert="timer">Timer alert</button>
<button class="btn btn-primary" data-toggle="sweet-alert" data-sweet-alert="image">Image alert</button>