use urlgen and store it in a variable

This commit is contained in:
Rodney Ewing 2013-08-08 11:23:16 -07:00
parent 04d8ced5c6
commit 4a2aa93c6a
2 changed files with 4 additions and 1 deletions

View File

@ -41,7 +41,7 @@ $(document).ready(function () {
mark_all_comments_seen.onclick = function() {
$.ajax({
type: 'GET',
url: '/notifications/comments/mark_all_seen/',
url: mark_all_comments_seen_url,
success: function(res, status, xhr) { window.location.reload(); },
});
}

View File

@ -37,6 +37,9 @@
src="{{ request.staticdirect('/js/header_dropdown.js') }}"></script>
<script type="text/javascript"
src="{{ request.staticdirect('/js/notifications.js') }}"></script>
<script>
var mark_all_comments_seen_url = "{{ request.urlgen('mediagoblin.notifications.mark_all_comment_notifications_seen') }}"
</script>
{# For clarification, the difference between the extra_head.html template
# and the head template hook is that the former should be used by