mirror of
https://github.com/pinry/pinry.git
synced 2025-11-14 00:55:43 +01:00
Now shows messages from django
This commit is contained in:
@@ -14,4 +14,10 @@ $(document).ready(function() {
|
||||
}, 3300);
|
||||
});
|
||||
}
|
||||
|
||||
if (errors) {
|
||||
for (var i in errors) {
|
||||
message(errors[i].text, errors[i].tags);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
@@ -36,6 +36,12 @@
|
||||
<!-- Start JavaScript Variables -->
|
||||
<script>
|
||||
var apiLimitPerPage = {{ API_LIMIT_PER_PAGE }},
|
||||
errors = {% if not messages %}null,{% else %}[
|
||||
{% for message in messages %}{
|
||||
tags: "{{ message.tags }}",
|
||||
text: "{{ message }}"
|
||||
}{% endfor %}
|
||||
],{% endif %}
|
||||
currentUser = {
|
||||
id: "{{ user.id }}",
|
||||
username: "{{ user.username }}",
|
||||
|
||||
Reference in New Issue
Block a user