<script type='text/javascript'>
  {# not compressable #}
  askbot['urls']['postComments'] = '{{ url('post_comments') }}';
  askbot['urls']['editComment'] = '{{ url('edit_comment') }}';
  askbot['urls']['deleteComment'] = '{{ url('delete_comment') }}';
  askbot['urls']['convertComment'] = '{{ url('comment_to_answer') }}';
  askbot['urls']['getComment'] = '{{ url('get_comment') }}';
  askbot['urls']['saveDraftAnswer'] = '{{ url('save_draft_answer') }}';
  askbot['urls']['vote_url'] = '{{ url('vote') }}'
  askbot['urls']['user_signin'] = '{{ settings.LOGIN_URL }}';
  askbot['urls']['upvote_comment'] = '{{ url('upvote_comment') }}';
  askbot['urls']['delete_post'] = '{{ url('delete_post') }}';
  askbot['urls']['get_html_template'] = '{{ url('get_html_template') }}';
  askbot['urls']['getGroupsList'] = '{{ url('get_groups_list') }}';
  askbot['urls']['publishPost'] = '{{ url('publish_post') }}';
  askbot['urls']['apiV1Questions'] = '{{ url('api_v1_questions') }}';
  askbot['urls']['mergeQuestions'] = '{{ url('merge_questions') }}';
  askbot['urls']['getPostHtml'] = '{{ url('get_post_html') }}';
  askbot['urls']['retag'] = "{{ url('retag_question',  question.id ) }}";
  {# already added on top askbot['data']['userIsThreadModerator'] = {{ user_is_thread_moderator|as_js_bool }}; #}
  askbot['data']['questionAuthorId'] = {{ question.author_id }};
  askbot['data']['answersSortTab'] = '{{ tab_id }}';
  askbot['data']['questionId'] = {{ question.id }};
  askbot['data']['threadId'] = {{ thread.id }};
  askbot['data']['threadSlug'] = '{{ thread.title|slugify }}';
  askbot['messages']['addComment'] = '{{ gettext('add a comment')|escapejs }}';
  askbot['messages']['userNamePrompt'] = '{{ gettext('User name:')|escapejs }}';
  askbot['messages']['userEmailPrompt'] = '{{ gettext('Email address:')|escapejs }}';
  askbot['messages']['mergeQuestions'] = '{{ settings.WORDS_MERGE_QUESTIONS|escapejs }}';
  askbot['messages']['enterDuplicateQuestionId'] = '{{ settings.WORDS_ENTER_DUPLICATE_QUESTION_ID|escapejs }}';
  {% if settings.READ_ONLY_MODE_ENABLED %}
      askbot['messages']['readOnlyMessage'] = "{{ settings.READ_ONLY_MESSAGE|escapejs }}";
  {% endif %}
  askbot['settings']['saveCommentOnEnter'] = {{ settings.SAVE_COMMENT_ON_ENTER|as_js_bool }};
  askbot['settings']['tagSource'] = '{{ settings.TAG_SOURCE }}';
  askbot['settings']['enableEmailAlerts'] = {{ settings.ENABLE_EMAIL_ALERTS|as_js_bool }};

  {# IMPORTANT !!! the same number for avatar size as in below two lines must be set in the comment macro #}
  askbot['settings']['commentAvatarSize'] = 16;
  {% if request.user.is_authenticated %}
    askbot['data']['userCommentAvatarUrl'] = '{{ request.user.get_avatar_url(16)|escapejs }}';
  {% endif %}
</script>
