Browse Source

Converted templates to Django-Jinja2 syntax. #154

Ralfp 12 years ago
parent
commit
db23aa0f73
98 changed files with 537 additions and 522 deletions
  1. 4 1
      misago/settings_base.py
  2. 1 1
      misago/templatetags/datetime.py
  3. 16 4
      misago/templatetags/django2jinja.py
  4. 1 1
      misago/templatetags/md.py
  5. 2 2
      misago/templatetags/utils.py
  6. 1 1
      templates/_email/private_thread_invite.html
  7. 1 1
      templates/_email/private_thread_invite.txt
  8. 1 1
      templates/_email/private_thread_reply_notification.html
  9. 1 1
      templates/_email/private_thread_reply_notification.txt
  10. 1 1
      templates/_email/report_reply_notification.html
  11. 1 1
      templates/_email/report_reply_notification.txt
  12. 1 1
      templates/_email/thread_reply_notification.html
  13. 1 1
      templates/_email/thread_reply_notification.txt
  14. 2 2
      templates/_email/users/activation/admin_done.html
  15. 1 1
      templates/_email/users/activation/admin_done.txt
  16. 2 2
      templates/_email/users/activation/invalidated.html
  17. 1 1
      templates/_email/users/activation/invalidated.txt
  18. 2 2
      templates/_email/users/activation/resend.html
  19. 1 1
      templates/_email/users/activation/resend.txt
  20. 2 2
      templates/_email/users/activation/user.html
  21. 1 1
      templates/_email/users/activation/user.txt
  22. 2 2
      templates/_email/users/new_credentials.html
  23. 1 1
      templates/_email/users/new_credentials.txt
  24. 2 2
      templates/_email/users/password/confirm.html
  25. 1 1
      templates/_email/users/password/confirm.txt
  26. 2 2
      templates/_email/users/password/new.html
  27. 1 1
      templates/_email/users/password/new.txt
  28. 2 2
      templates/_email/users/password/new_admin.html
  29. 1 1
      templates/_email/users/password/new_admin.txt
  30. 1 1
      templates/_forms.html
  31. 1 1
      templates/admin/admin/layout.html
  32. 2 2
      templates/admin/index.html
  33. 5 5
      templates/admin/layout.html
  34. 1 1
      templates/admin/online/list.html
  35. 1 1
      templates/admin/processing.html
  36. 1 1
      templates/admin/settings/search_results.html
  37. 3 3
      templates/admin/settings/settings.html
  38. 2 2
      templates/admin/signin.html
  39. 1 1
      templates/admin/stats/form.html
  40. 1 1
      templates/admin/team/list.html
  41. 2 2
      templates/admin/users/list.html
  42. 7 7
      templates/cranefly/category.html
  43. 1 1
      templates/cranefly/error403.html
  44. 1 1
      templates/cranefly/error403_banned.html
  45. 1 1
      templates/cranefly/error404.html
  46. 1 1
      templates/cranefly/forum_map.html
  47. 14 14
      templates/cranefly/index.html
  48. 32 32
      templates/cranefly/layout.html
  49. 1 1
      templates/cranefly/macros.html
  50. 9 9
      templates/cranefly/new_threads.html
  51. 5 5
      templates/cranefly/newsfeed.html
  52. 9 9
      templates/cranefly/popular_threads.html
  53. 8 8
      templates/cranefly/private_threads/changelog.html
  54. 8 8
      templates/cranefly/private_threads/changelog_diff.html
  55. 4 4
      templates/cranefly/private_threads/details.html
  56. 11 11
      templates/cranefly/private_threads/list.html
  57. 12 12
      templates/cranefly/private_threads/posting.html
  58. 54 54
      templates/cranefly/private_threads/thread.html
  59. 4 4
      templates/cranefly/profiles/followers.html
  60. 4 4
      templates/cranefly/profiles/follows.html
  61. 8 8
      templates/cranefly/profiles/list.html
  62. 7 7
      templates/cranefly/profiles/posts.html
  63. 5 5
      templates/cranefly/profiles/profile.html
  64. 7 7
      templates/cranefly/profiles/threads.html
  65. 1 1
      templates/cranefly/register.html
  66. 8 8
      templates/cranefly/reports/changelog.html
  67. 8 8
      templates/cranefly/reports/changelog_diff.html
  68. 4 4
      templates/cranefly/reports/details.html
  69. 8 8
      templates/cranefly/reports/list.html
  70. 12 12
      templates/cranefly/reports/posting.html
  71. 43 43
      templates/cranefly/reports/thread.html
  72. 1 1
      templates/cranefly/resend_activation.html
  73. 1 1
      templates/cranefly/reset_password.html
  74. 1 1
      templates/cranefly/search/home.html
  75. 6 6
      templates/cranefly/search/results.html
  76. 6 6
      templates/cranefly/signin.html
  77. 7 7
      templates/cranefly/threads/changelog.html
  78. 7 7
      templates/cranefly/threads/changelog_diff.html
  79. 3 3
      templates/cranefly/threads/details.html
  80. 4 4
      templates/cranefly/threads/karmas.html
  81. 20 20
      templates/cranefly/threads/list.html
  82. 3 3
      templates/cranefly/threads/merge.html
  83. 3 3
      templates/cranefly/threads/move_posts.html
  84. 3 3
      templates/cranefly/threads/move_thread.html
  85. 3 3
      templates/cranefly/threads/move_threads.html
  86. 12 12
      templates/cranefly/threads/posting.html
  87. 3 3
      templates/cranefly/threads/split.html
  88. 52 52
      templates/cranefly/threads/thread.html
  89. 4 4
      templates/cranefly/usercp/avatar.html
  90. 2 2
      templates/cranefly/usercp/avatar_crop.html
  91. 1 1
      templates/cranefly/usercp/avatar_gallery.html
  92. 2 2
      templates/cranefly/usercp/avatar_upload.html
  93. 1 1
      templates/cranefly/usercp/credentials.html
  94. 1 1
      templates/cranefly/usercp/layout.html
  95. 2 2
      templates/cranefly/usercp/options.html
  96. 1 1
      templates/cranefly/usercp/signature.html
  97. 1 1
      templates/cranefly/usercp/username.html
  98. 13 13
      templates/cranefly/watched.html

+ 4 - 1
misago/settings_base.py

@@ -100,6 +100,9 @@ JINJA2_EXTENSIONS = (
     'jinja2.ext.do',
 )
 
+# Turn autoescape on
+JINJA2_AUTOESCAPE = True
+
 # List of application middlewares
 MIDDLEWARE_CLASSES = (
     'misago.middleware.stopwatch.StopwatchMiddleware',
@@ -180,9 +183,9 @@ ROOT_URLCONF = 'misago.urls'
 INSTALLED_APPS = (
     # Applications that have no dependencies first!
     'south', # Database schema building and updating
-    'django_jinja', # Jinja2 integration
     'django.contrib.staticfiles',
     'django.contrib.humanize',
+    'django_jinja', # Jinja2 integration
     'mptt', # Modified Pre-order Tree Transversal - allows us to nest forums 
     'haystack', # Search engines bridge
     'debug_toolbar', # Debug toolbar'

+ 1 - 1
misago/templatetags/datetime.py

@@ -1,4 +1,4 @@
-from coffin.template import Library
+from django_jinja.library import Library
 from misago.utils.datesformats import date, reldate, reltimesince, compact, relcompact
 
 register = Library()

+ 16 - 4
misago/templatetags/django2jinja.py

@@ -1,18 +1,20 @@
 import math
 import urllib
-from coffin.template import Library
+from django.contrib.humanize.templatetags.humanize import (intcomma as intcomma_func,
+                                                           intword as intword_func)
+from django_jinja.library import Library
 from django.conf import settings
 from misago.utils.strings import slugify
 
 register = Library()
 
 
-@register.object(name='widthratio')
+@register.global_function(name='widthratio')
 def widthratio(min=0, max=100, range=100):
     return int(math.ceil(float(float(min) / float(max) * int(range))))
 
 
-@register.object(name='query')
+@register.global_function(name='query')
 def query_string(**kwargs):
     query = urllib.urlencode(kwargs)
     return '?%s' % (query if kwargs else '')
@@ -31,4 +33,14 @@ def low(value):
 
 @register.filter(name="slugify")
 def slugify_function(format_string):
-    return slugify(format_string)
+    return slugify(format_string)
+
+
+@register.filter(name="intcomma")
+def intcomma(val, use_l10n=True):
+    return intcomma_func(val, use_l10n)
+
+
+@register.filter(name="intword")
+def intword(val):
+    return intword_func(val)

+ 1 - 1
misago/templatetags/md.py

@@ -1,5 +1,5 @@
 from markdown import markdown
-from coffin.template import Library
+from django_jinja.library import Library
 from django.conf import settings
 import misago.markdown
 

+ 2 - 2
misago/templatetags/utils.py

@@ -1,11 +1,11 @@
-from coffin.template import Library
+from django_jinja.library import Library
 from haystack.utils import Highlighter
 from misago.utils.strings import short_string
 
 register = Library()
 
 
-@register.object(name='intersect')
+@register.global_function(name='intersect')
 def intersect(list_a, list_b):
     for i in list_a:
         if i in list_b:

+ 1 - 1
templates/_email/private_thread_invite.html

@@ -5,5 +5,5 @@
 {% block content %}
 <p {{ style_p|safe }}>{% trans username=user.username, author=author.username, thread=thread.name %}{{ username }}, you are receiving this message because {{ author }} has invited you to participate in private thread "{{ thread }}".{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}You can see this thread by clicking link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'private_thread' thread=thread.pk, slug=thread.slug %}" {{ style_link|safe }}>{{ board_address }}{% url 'private_thread' thread=thread.pk, slug=thread.slug %}</a>
+<a href="{{ board_address }}{{ url('private_thread', thread=thread.pk, slug=thread.slug) }}" {{ style_link|safe }}>{{ board_address }}{{ url('private_thread', thread=thread.pk, slug=thread.slug) }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/private_thread_invite.txt

@@ -6,5 +6,5 @@
 {% trans username=user.username, author=author.username, thread=thread.name %}{{ username }}, you are receiving this message because {{ author }} has invited you to participate in private thread "{{ thread }}".{% endtrans %}
 
 {% trans %}You can see this thread by clicking link below:{% endtrans %}
-{{ board_address }}{% url 'private_thread' thread=thread.pk, slug=thread.slug %}
+{{ board_address }}{{ url('private_thread', thread=thread.pk, slug=thread.slug) }}
 {% endblock %}

+ 1 - 1
templates/_email/private_thread_reply_notification.html

@@ -5,5 +5,5 @@
 {% block content %}
 <p {{ style_p|safe }}>{% trans username=user.username, author=author.username, thread=thread.name %}{{ username }}, you are receiving this message because {{ author }} has replied to private thread "{{ thread }}" that you are watching.{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}To go to this reply follow the link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" {{ style_link|safe }}>{{ board_address }}{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}</a>
+<a href="{{ board_address }}{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" {{ style_link|safe }}>{{ board_address }}{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/private_thread_reply_notification.txt

@@ -6,5 +6,5 @@
 {% trans username=user.username, author=author.username, thread=thread.name %}{{ username }}, you are receiving this message because {{ author }} has replied to private thread "{{ thread }}" that you are watching.{% endtrans %}
 
 {% trans %}To go to this reply follow the link below:{% endtrans %}
-{{ board_address }}{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}
+{{ board_address }}{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}
 {% endblock %}

+ 1 - 1
templates/_email/report_reply_notification.html

@@ -5,5 +5,5 @@
 {% block content %}
 <p {{ style_p|safe }}>{% trans username=user.username, author=author.username, thread=thread.name %}{{ username }}, you are receiving this message because {{ author }} has replied to report "{{ thread }}" that you are watching.{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}To go to this reply follow the link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" {{ style_link|safe }}>{{ board_address }}{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}</a>
+<a href="{{ board_address }}{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" {{ style_link|safe }}>{{ board_address }}{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/report_reply_notification.txt

@@ -6,5 +6,5 @@
 {% trans username=user.username, author=author.username, thread=thread.name %}{{ username }}, you are receiving this message because {{ author }} has replied to report "{{ thread }}" that you are watching.{% endtrans %}
 
 {% trans %}To go to this reply follow the link below:{% endtrans %}
-{{ board_address }}{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}
+{{ board_address }}{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}
 {% endblock %}

+ 1 - 1
templates/_email/thread_reply_notification.html

@@ -5,5 +5,5 @@
 {% block content %}
 <p {{ style_p|safe }}>{% trans username=user.username, author=author.username, thread=thread.name %}{{ username }}, you are receiving this message because {{ author }} has replied to thread "{{ thread }}" that you are watching.{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}To go to this reply follow the link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" {{ style_link|safe }}>{{ board_address }}{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}</a>
+<a href="{{ board_address }}{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" {{ style_link|safe }}>{{ board_address }}{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/thread_reply_notification.txt

@@ -6,5 +6,5 @@
 {% trans username=user.username, author=author.username, thread=thread.name %}{{ username }}, you are receiving this message because {{ author }} has replied to thread "{{ thread }}" that you are watching.{% endtrans %}
 
 {% trans %}To go to this reply follow the link below:{% endtrans %}
-{{ board_address }}{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}
+{{ board_address }}{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}
 {% endblock %}

+ 2 - 2
templates/_email/users/activation/admin_done.html

@@ -4,8 +4,8 @@
 <p {{ style_p|safe }}>{% trans username=user.username %}{{ username }}, you are receiving this message because board administrator has activated your account.{% endtrans %}</p>
 
 <p {{ style_p|safe }}>{% trans %}You can sign in to your account using new password by following this link:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'sign_in' %}" {{ style_button|safe }}>{% trans %}Sign In{% endtrans %}</a>
+<a href="{{ board_address }}{{ url('sign_in') }}" {{ style_button|safe }}>{% trans %}Sign In{% endtrans %}</a>
 
 <p {{ style_p|safe }}>{% trans %}If the above link is not clickable, copy and paste this link into your web browser's address bar:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'sign_in' %}" {{ style_link|safe }}>{{ board_address }}{% url 'sign_in' %}</a>
+<a href="{{ board_address }}{{ url('sign_in') }}" {{ style_link|safe }}>{{ board_address }}{{ url('sign_in') }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/users/activation/admin_done.txt

@@ -4,5 +4,5 @@
 {% trans username=user.username %}{{ username }}, you are receiving this message because board administrator has activated your account.{% endtrans %}
 
 {% trans %}You can sign in to your account using new password by following this link:{% endtrans %}
-{{ board_address }}{% url 'sign_in' %}
+{{ board_address }}{{ url('sign_in') }}
 {% endblock %}

+ 2 - 2
templates/_email/users/activation/invalidated.html

@@ -5,8 +5,8 @@
 {% block content %}
 <p {{ style_p|safe }}>{% trans username=user.username %}{{ username }}, you are receiving this message because board administrator has requested you to revalidate your e-mail address.{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}To reactivate your account click the link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}" {{ style_button|safe }}>{% trans %}Activate my account!{% endtrans %}</a>
+<a href="{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}" {{ style_button|safe }}>{% trans %}Activate my account!{% endtrans %}</a>
 
 <p {{ style_p|safe }}>{% trans %}If the above link is not clickable, copy and paste this link into your web browser's address bar:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}" {{ style_link|safe }}>{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}</a>
+<a href="{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}" {{ style_link|safe }}>{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/users/activation/invalidated.txt

@@ -6,5 +6,5 @@
 {% trans username=user.username %}{{ username }}, you are receiving this message because board administrator has requested you to revalidate your e-mail address.{% endtrans %}
 
 {% trans %}To reactivate your account click the link below:{% endtrans %}
-{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}
+{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}
 {% endblock %}

+ 2 - 2
templates/_email/users/activation/resend.html

@@ -5,8 +5,8 @@
 {% block content %}
 <p {{ style_p|safe }}>{% trans username=user.username %}{{ username }}, you are receiving this message because you have requested new activation e-mail.{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}To activate your account, click the link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}" {{ style_button|safe }}>{% trans %}Activate my account!{% endtrans %}</a>
+<a href="{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}" {{ style_button|safe }}>{% trans %}Activate my account!{% endtrans %}</a>
 
 <p {{ style_p|safe }}>{% trans %}If the above link is not clickable, copy and paste this link into your web browser's address bar:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}" {{ style_link|safe }}>{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}</a>
+<a href="{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}" {{ style_link|safe }}>{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/users/activation/resend.txt

@@ -6,5 +6,5 @@
 {% trans username=user.username %}{{ username }}, you are receiving this message because you have requested new activation e-mail.{% endtrans %}
 
 {% trans %}To activate your account, click the link below:{% endtrans %}
-{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}
+{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}
 {% endblock %}

+ 2 - 2
templates/_email/users/activation/user.html

@@ -5,8 +5,8 @@
 
 <p {{ style_p|safe }}>{% trans %}We require our members to prove validity of e-mail address used during registration. To prove that you are owner of e-mail address used to create this account, click the link below:{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}To activate your account, click the link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}" {{ style_button|safe }}>{% trans %}Activate my account!{% endtrans %}</a>
+<a href="{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}" {{ style_button|safe }}>{% trans %}Activate my account!{% endtrans %}</a>
 
 <p {{ style_p|safe }}>{% trans %}If the above link is not clickable, copy and paste this link into your web browser's address bar:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}" {{ style_link|safe }}>{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}</a>
+<a href="{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}" {{ style_link|safe }}>{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/users/activation/user.txt

@@ -4,5 +4,5 @@
 {{ super() }}
 
 {% trans %}We require our members to prove validity of e-mail address used during registration. To prove that you are owner of e-mail address used to create this account, click the link below:{% endtrans %}
-{{ board_address }}{% url 'activate' username=user.username_slug, user=user.id, token=user.token %}
+{{ board_address }}{{ url('activate', username=user.username_slug, user=user.id, token=user.token) }}
 {% endblock %}

+ 2 - 2
templates/_email/users/new_credentials.html

@@ -5,9 +5,9 @@
 {% block content %}
 <p {{ style_p|safe }}>{% trans username=user.username %}{{ username }}, you are receiving this message because you have changed your acount's sign-in credentials.{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}To confirm that you want to change your account's sign-in credentials with new ones click the link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'usercp_credentials_activate' token=token %}" {{ style_button|safe }}>{% trans %}Activate New Credentials{% endtrans %}</a>
+<a href="{{ board_address }}{{ url('usercp_credentials_activate', token=token) }}" {{ style_button|safe }}>{% trans %}Activate New Credentials{% endtrans %}</a>
 
 <p {{ style_p|safe }}>{% trans %}If the above link is not clickable, copy and paste this link into your web browser's address bar:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'usercp_credentials_activate' token=token %}" {{ style_link|safe }}>{{ board_address }}{% url 'usercp_credentials_activate' token=token %}</a>
+<a href="{{ board_address }}{{ url('usercp_credentials_activate', token=token) }}" {{ style_link|safe }}>{{ board_address }}{{ url('usercp_credentials_activate', token=token) }}</a>
 
 {% endblock %}

+ 1 - 1
templates/_email/users/new_credentials.txt

@@ -6,5 +6,5 @@
 {% trans username=user.username %}{{ username }}, you are receiving this message because you have changed your acount's sign-in credentials.{% endtrans %}
 
 {% trans %}To confirm that you want to change your account's sign-in credentials with new ones click the link below:{% endtrans %}
-{{ board_address }}{% url 'usercp_credentials_activate' token=token %}
+{{ board_address }}{{ url('usercp_credentials_activate', token=token) }}
 {% endblock %}

+ 2 - 2
templates/_email/users/password/confirm.html

@@ -5,10 +5,10 @@
 {% block content %}
 <p {{ style_p|safe }}>{% trans username=user.username %}{{ username }}, you are receiving this message because you have requested for new password to be generated and set on your account.{% endtrans %}</p>
 <p {{ style_p|safe }}>{% trans %}To confirm that you want to reset your account's password with new one click the link below:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'reset_password' username=user.username_slug, user=user.id, token=user.token %}" {{ style_button|safe }}>{% trans %}Reset my password{% endtrans %}</a>
+<a href="{{ board_address }}{{ url('reset_password', username=user.username_slug, user=user.id, token=user.token) }}" {{ style_button|safe }}>{% trans %}Reset my password{% endtrans %}</a>
 
 <p {{ style_p|safe }}>{% trans %}If the above link is not clickable, copy and paste this link into your web browser's address bar:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'reset_password' username=user.username_slug, user=user.id, token=user.token %}" {{ style_link|safe }}>{{ board_address }}{% url 'reset_password' username=user.username_slug, user=user.id, token=user.token %}</a>
+<a href="{{ board_address }}{{ url('reset_password', username=user.username_slug, user=user.id, token=user.token) }}" {{ style_link|safe }}>{{ board_address }}{{ url('reset_password', username=user.username_slug, user=user.id, token=user.token) }}</a>
 
 <p {{ style_p|safe }}>{% trans %}Your new password will be sent back to you in next message once you click confirmation link.{% endtrans %}</p>
 

+ 1 - 1
templates/_email/users/password/confirm.txt

@@ -6,7 +6,7 @@
 {% trans username=user.username %}{{ username }}, you are receiving this message because you have requested for new password to be generated and set on your account.{% endtrans %}
 
 {% trans %}To confirm that you want to reset your account's password with new one click the link below:{% endtrans %}
-{{ board_address }}{% url 'reset_password' username=user.username_slug, user=user.id, token=user.token %}
+{{ board_address }}{{ url('reset_password', username=user.username_slug, user=user.id, token=user.token) }}
 
 {% trans %}Your new password will be sent back to you in next message once you click confirmation link.{% endtrans %}
 {% endblock %}

+ 2 - 2
templates/_email/users/password/new.html

@@ -9,8 +9,8 @@
   {{ password }}
 </div>
 <p {{ style_p|safe }}>{% trans %}You can sign in to your account using new password by following this link:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'sign_in' %}" {{ style_button|safe }}>{% trans %}Sign In{% endtrans %}</a>
+<a href="{{ board_address }}{{ url('sign_in') }}" {{ style_button|safe }}>{% trans %}Sign In{% endtrans %}</a>
 
 <p {{ style_p|safe }}>{% trans %}If the above link is not clickable, copy and paste this link into your web browser's address bar:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'sign_in' %}" {{ style_link|safe }}>{{ board_address }}{% url 'sign_in' %}</a>
+<a href="{{ board_address }}{{ url('sign_in') }}" {{ style_link|safe }}>{{ board_address }}{{ url('sign_in') }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/users/password/new.txt

@@ -8,5 +8,5 @@
 {% trans %}Your new password:{% endtrans %} {{ password }}
 
 {% trans %}You can sign in to your account using new password by following this link:{% endtrans %}
-{{ board_address }}{% url 'sign_in' %}
+{{ board_address }}{{ url('sign_in') }}
 {% endblock %}

+ 2 - 2
templates/_email/users/password/new_admin.html

@@ -7,8 +7,8 @@
   {{ password }}
 </div>
 <p {{ style_p|safe }}>{% trans %}You can sign in to your account using new password by following this link:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'sign_in' %}" {{ style_button|safe }}>{% trans %}Sign In{% endtrans %}</a>
+<a href="{{ board_address }}{{ url('sign_in') }}" {{ style_button|safe }}>{% trans %}Sign In{% endtrans %}</a>
 
 <p {{ style_p|safe }}>{% trans %}If the above link is not clickable, copy and paste this link into your web browser's address bar:{% endtrans %}</p>
-<a href="{{ board_address }}{% url 'sign_in' %}" {{ style_link|safe }}>{{ board_address }}{% url 'sign_in' %}</a>
+<a href="{{ board_address }}{{ url('sign_in') }}" {{ style_link|safe }}>{{ board_address }}{{ url('sign_in') }}</a>
 {% endblock %}

+ 1 - 1
templates/_email/users/password/new_admin.txt

@@ -6,5 +6,5 @@
 {% trans %}Your new password:{% endtrans %} {{ password }}
 
 {% trans %}You can sign in to your account using new password by following this link:{% endtrans %}
-{{ board_address }}{% url 'sign_in' %}
+{{ board_address }}{{ url('sign_in') }}
 {% endblock %}

+ 1 - 1
templates/_forms.html

@@ -115,7 +115,7 @@
 </label>
 {%- endmacro -%}
 {%- macro make_tos() -%}
-<a href="{% if settings.tos_url %}{{ settings.tos_url }}{% else %}{% url 'tos' %}{% endif %}">{% if settings.tos_title %}{{ settings.tos_title }}{% else %}{% trans %}Terms of Service{% endtrans %}{% endif %}</a>
+<a href="{% if settings.tos_url %}{{ settings.tos_url }}{% else %}{{ url('tos') }}{% endif %}">{% if settings.tos_title %}{{ settings.tos_title }}{% else %}{% trans %}Terms of Service{% endtrans %}{% endif %}</a>
 {%- endmacro -%}
 
 {# Date input #}

+ 1 - 1
templates/admin/admin/layout.html

@@ -15,7 +15,7 @@
 <div class="page-header{% if admin.actions|length > 1 %} tabs-header{% endif %}">
   <h1>{{ admin.name }}{% if admin.help %} <small>{{ admin.help }}</small>{% endif %}</h1>
   {% if admin.actions|length > 1 %}<ul class="nav nav-tabs">{% for item in admin.actions %}
-  	<li{% if action.id == item.id %} class="active"{% endif %}><a href="{{ item.route|url() }}"{% if action.id != item.id and item.help %} class="tooltip-bottom" title="{{ item.help }}"{% endif %}>{{ item.name }}</a></li>{% endfor %}
+  	<li{% if action.id == item.id %} class="active"{% endif %}><a href="{{ url(item.route) }}"{% if action.id != item.id and item.help %} class="tooltip-bottom" title="{{ item.help }}"{% endif %}>{{ item.name }}</a></li>{% endfor %}
   </ul>{% endif %}
 </div>
 {% if admin.actions[0].id != action.id -%}

+ 2 - 2
templates/admin/index.html

@@ -14,7 +14,7 @@
 {% if monitor.users_inactive|int > 0 %}
 <div class="alert alert-info alert-form">
   <div class="alert-icon"><span><i class="icon-info-sign icon-white"></i></span></div>
-  <p><a href="{% url 'admin_users_inactive' %}">{%- trans count=monitor.users_inactive|int, total=monitor.users_inactive|int|intcomma -%}
+  <p><a href="{{ url('admin_users_inactive') }}">{%- trans count=monitor.users_inactive|int, total=monitor.users_inactive|int|intcomma -%}
   There is one inactive user.
   {%- pluralize -%}
   There are {{ total }} inactive users.
@@ -35,7 +35,7 @@ One Administrator Online
         {% for session in admins %}    	
         <tr>
           <td>
-              <a href="{% url 'user' username=session.user.username_slug, user=session.user.pk %}"><img src="{{ session.user.get_avatar(22) }}" class="avatar" alt=""> <strong>{{ session.user.username }}</strong></a>
+              <a href="{{ url('user', username=session.user.username_slug, user=session.user.pk) }}"><img src="{{ session.user.get_avatar(22) }}" class="avatar" alt=""> <strong>{{ session.user.username }}</strong></a>
               <div class="muted" style="float: right;">{% trans start=session.start|timesince, ip=session.ip %}started {{ start }} ago from {{ ip }}{% endtrans %} <span class="info-popover tooltip-top" title="{% trans last=session.last|timesince %}Last click was {{ last }} ago{% endtrans %}"><i class="icon-time"></i></span></div>
           </td>
         </tr>{% endfor %}

+ 5 - 5
templates/admin/layout.html

@@ -7,13 +7,13 @@
 <div id="page-top" class="navbar navbar-static-top navbar-sections">
   <div class="navbar-inner">
     <div class="container">
-      <a class="brand" href="{{ admin_index|url() }}">Misago <span>{{ version }}</span></a>
+      <a class="brand" href="{{ url(admin_index) }}">Misago <span>{{ version }}</span></a>
       <ul class="nav">{% for section in sections %}
-      	<li{% if section.is_active and not exception_response %} class="active"{% endif %}><a href="{{ section.route|url() }}"><i class="icon-{{ section.icon }}"></i> {{ section.name }}</a></li>{% endfor %}
+      	<li{% if section.is_active and not exception_response %} class="active"{% endif %}><a href="{{ url(section.route) }}"><i class="icon-{{ section.icon }}"></i> {{ section.name }}</a></li>{% endfor %}
       </ul>
-      <form class="navbar-form user-signout pull-right" action="{% url 'admin_sign_out' %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn btn-link"><i class="icon-off"></i> {% trans %}Sign Out{% endtrans %}</button></form>
+      <form class="navbar-form user-signout pull-right" action="{{ url('admin_sign_out') }}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn btn-link"><i class="icon-off"></i> {% trans %}Sign Out{% endtrans %}</button></form>
       <ul class="nav pull-right">
-      	<li><a href="{% url 'index' %}"><i class="icon-home"></i> {% trans %}Forums Index{% endtrans %}</a></li>
+      	<li><a href="{{ url('index') }}"><i class="icon-home"></i> {% trans %}Forums Index{% endtrans %}</a></li>
       </ul>
       <div class="user-profile pull-right">
         <img src="{{ user.get_avatar(28) }}" class="avatar-small" alt=""> {{ user.username }}
@@ -25,7 +25,7 @@
   <div class="navbar-inner">
     <div class="container">
       <ul class="nav">{% for action in actions %}
-      	<li{% if action.is_active %} class="active"{% elif action.help %} class="tooltip-bottom" title="{{ action.help }}"{% endif %}><a href="{{ action.route|url() }}"><i class="icon-{{ action.icon }}"></i> {{ action.name }}</a></li>{% endfor %}
+      	<li{% if action.is_active %} class="active"{% elif action.help %} class="tooltip-bottom" title="{{ action.help }}"{% endif %}><a href="{{ url(action.route) }}"><i class="icon-{{ action.icon }}"></i> {{ action.name }}</a></li>{% endfor %}
       </ul>
     </div>
   </div>

+ 1 - 1
templates/admin/online/list.html

@@ -6,7 +6,7 @@
 {% block table_row scoped %}
   <td>
   	<strong class="lead{% if not item.user %} muted{% endif %}">{% if item.user -%}
-  	<a href="{% url 'user' username=item.user.username_slug, user=item.user.id %}">{{ item.user.username }}</a>
+  	<a href="{{ url('user', username=item.user.username_slug, user=item.user.id) }}">{{ item.user.username }}</a>
   	{%- elif item.crawler -%}
   	{{ item.crawler }}
   	{%- else -%}

+ 1 - 1
templates/admin/processing.html

@@ -9,7 +9,7 @@
 {% block header %}<strong>{{ target_name }}</strong>{% endblock %}
       
 {% block content %}
-          <form class="form-vertical" action="{{ admin_index|url() }}" method="post">
+          <form class="form-vertical" action="{{ url(admin_index) }}" method="post">
           	<div class="form-container">
           	  <p class="lead">{{ task_name }}...</p>
               <div class="progress progress-striped active">

+ 1 - 1
templates/admin/settings/search_results.html

@@ -11,7 +11,7 @@
 {% for setting in found_settings %}
 <h4>{{ _(setting.name) }} <small>{{ _(setting.group.name) }}</small></h4>
 {%- if setting.description %}<p>{{ _(setting.description) }}</p>{% endif -%}
-<a href="{% url 'admin_settings' group_id=setting.group.id, group_slug=setting.group.key %}#id_{{ setting.pk }}">{% trans %}Go to this setting{% endtrans %}</a>
+<a href="{{ url('admin_settings', group_id=setting.group.id, group_slug=setting.group.key) }}#id_{{ setting.pk }}">{% trans %}Go to this setting{% endtrans %}</a>
 <hr>
 {% endfor %}
 {% endblock %}

+ 3 - 3
templates/admin/settings/settings.html

@@ -14,13 +14,13 @@
   <div class="span3">
     <ul class="nav nav-pills nav-stacked side-panel">
       <h4>{% trans %}Search Settings{% endtrans %}</h4>
-      <form action="{% url 'admin_settings_search' %}" class="form-inline" method="post">
+      <form action="{{ url('admin_settings_search') }}" class="form-inline" method="post">
         <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
         {{ form_theme.input_text(search_form.fields.search_text, width=2, attrs={'placeholder': lang_search_settings()}) }}
         <button type="submit" class="btn btn-primary"><i class="icon-search icon-white"></i></button>
       </form>
       <h4>{% trans%}Settings Groups{% endtrans %}</h4>{% for group in groups %}
-      <li{% if group.is_active(active_group) %} class="active"{% endif %}><a href="{% url 'admin_settings' group_id=group.id, group_slug=group.key %}"{% if not group.is_active(active_group) and group.description %} class="tooltip-right" title="{{ _(group.description) }}"{% endif %}>{{ _(group.name) }}</a></li>{% endfor %}
+      <li{% if group.is_active(active_group) %} class="active"{% endif %}><a href="{{ url('admin_settings', group_id=group.id, group_slug=group.key) }}"{% if not group.is_active(active_group) and group.description %} class="tooltip-right" title="{{ _(group.description) }}"{% endif %}>{{ _(group.name) }}</a></li>{% endfor %}
     </ul>
   </div>
   <div class="span9">{% block action %}
@@ -28,7 +28,7 @@
   	{{ draw_message(message, 'alert-form') }}
   	{% endif %}{% if active_group.description %}
   	<p>{{ _(active_group.description) }}</p>{% endif %}
-    <form class="form-vertical" action="{% url 'admin_settings' group_id=active_group.id, group_slug=active_group.key %}" method="post">
+    <form class="form-vertical" action="{{ url('admin_settings', group_id=active_group.id, group_slug=active_group.key) }}" method="post">
       <div class="form-container">
        	{{ form_theme.form_widget(form, width=9) }}
       </div>

+ 2 - 2
templates/admin/signin.html

@@ -13,13 +13,13 @@
 	        <p><strong>{{ message.message }}</strong></p>
           </div>
           {% endif %}
-          <form class="form-vertical" action="{{ admin_index|url() }}" method="post">
+          <form class="form-vertical" action="{{ url(admin_index) }}" method="post">
           	<div class="form-container">
               {{ form_theme.form_widget(form, width=4) }}
             </div>
             <div class="form-actions">
               <button type="submit" class="btn btn-primary"><i class="icon-ok icon-white"></i> {% trans %}Sign In{% endtrans %}</button>
-              <a href="{% url 'index' %}" class="btn pull-right"><i class="icon-home"></i> {% trans %}Return to Forums{% endtrans %}</a>
+              <a href="{{ url('index') }}" class="btn pull-right"><i class="icon-home"></i> {% trans %}Return to Forums{% endtrans %}</a>
             </div>
           </form>
 {% endblock %}

+ 1 - 1
templates/admin/stats/form.html

@@ -5,7 +5,7 @@
 {% block action %}<div class="row">
   <div class="span8 offset2">
   	<h2>{% trans %}New Report{% endtrans %}</h2>
-    <form action="{% url 'admin_stats' %}" class="form-vertical" method="post">
+    <form action="{{ url('admin_stats') }}" class="form-vertical" method="post">
       <div class="form-container">
         {{ form_theme.form_widget(form, width=8) }}
       </div>

+ 1 - 1
templates/admin/team/list.html

@@ -14,7 +14,7 @@
     <tr>
       {% for user in items %} 
       <td class="colspan6">
-          <a href="{% url 'user' username=user.username_slug, user=user.pk %}"><img src="{{ user.get_avatar(42) }}" class="avatar" alt=""> <strong>{{ user.username }}</strong></a>
+          <a href="{{ url('user', username=user.username_slug, user=user.pk) }}"><img src="{{ user.get_avatar(42) }}" class="avatar" alt=""> <strong>{{ user.username }}</strong></a>
       </td>{% if loop.last and loop.index is odd %}
       <td class="span6">
       	&nbsp;

+ 2 - 2
templates/admin/users/list.html

@@ -7,7 +7,7 @@
 {% if monitor.users_inactive|int > 0 %}
 <div class="alert alert-info alert-form">
   <div class="alert-icon"><span><i class="icon-info-sign icon-white"></i></span></div>
-  <p><a href="{% url 'admin_users_inactive' %}">{%- trans count=monitor.users_inactive|int, total=monitor.users_inactive|int|intcomma -%}
+  <p><a href="{{ url('admin_users_inactive') }}">{%- trans count=monitor.users_inactive|int, total=monitor.users_inactive|int|intcomma -%}
   There is one inactive user.
   {%- pluralize -%}
   There are {{ total }} inactive users.
@@ -26,7 +26,7 @@
 {% block table_row scoped %}
   <td class="avatar-small"><img src="{{ item.get_avatar(28) }}" class="avatar-small" alt=""></td>
   <td class="lead-cell">
-  	<strong><a href="{% url 'user' username=item.username_slug, user=item.pk %}">{{ item.username }}</a></strong> <span class="muted">{{ item.email }}</span>{% if item.activation > 0 %} <span class="label tooltip-top" title="{% if item.activation == 1 -%}
+  	<strong><a href="{{ url('user', username=item.username_slug, user=item.pk) }}">{{ item.username }}</a></strong> <span class="muted">{{ item.email }}</span>{% if item.activation > 0 %} <span class="label tooltip-top" title="{% if item.activation == 1 -%}
   	{% trans %}This user has not yet validated his e-mail address.{% endtrans %}
   	{%- else -%}
   	{% trans %}This user is awaiting admin approval.{% endtrans %}

+ 7 - 7
templates/cranefly/category.html

@@ -33,16 +33,16 @@
         <div class="forum-icon-wrap{% if forum.type == 'redirect' %} forum-icon-redirect{% elif not forum.is_read %} forum-icon-new{% endif %}"><i class="icon-{% if forum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %} icon-white"></i></div>
       </div>
       <div id="forum-{{ forum.id }}" class="forum-main">
-        <h3 class="forum-title{% if not forum.is_read %} forum-title-new{% endif %}"><a href="{{ forum.type|url(slug=forum.slug, forum=forum.id) }}">{{ forum.name }}</a></h3>
+        <h3 class="forum-title{% if not forum.is_read %} forum-title-new{% endif %}"><a href="{{ url(forum.type, slug=forum.slug, forum=forum.id) }}">{{ forum.name }}</a></h3>
         {% if forum.show_details %}
         <div class="forum-details">
           {% if forum.type != 'redirect' %}
           {% if acl.forums.can_browse(forum) and (acl.threads.can_read_threads(forum) == 2 or (acl.threads.can_read_threads(forum) == 1 and forum.last_poster_id == user.pk)) %}
           {% if forum.last_thread_id -%}
           <div class="thread-name">
-            <a href="{% url 'thread_new' thread=forum.last_thread_id, slug=forum.last_thread_slug %}"{% if forum.last_thread_name|length > 34 %} class="tooltip-top" title="{{ forum.last_thread_name }}"{% endif %}>{{ forum.last_thread_name|short_string(34) }}</a>
+            <a href="{{ url('thread_new', thread=forum.last_thread_id, slug=forum.last_thread_slug) }}"{% if forum.last_thread_name|length > 34 %} class="tooltip-top" title="{{ forum.last_thread_name }}"{% endif %}>{{ forum.last_thread_name|short_string(34) }}</a>
           </div>
-          <div class="muted">{% if forum.last_poster_id %}<a href="{% url 'user' user=forum.last_poster_id, username=forum.last_poster_slug %}" class="last-poster">{{ forum.last_poster_name }}</a>{% else %}<span class="last-poster">{{ forum.last_poster_name }}</span>{% endif %} - {{ forum.last_thread_date|reltimesince }}</div>
+          <div class="muted">{% if forum.last_poster_id %}<a href="{{ url('user', user=forum.last_poster_id, username=forum.last_poster_slug) }}" class="last-poster">{{ forum.last_poster_name }}</a>{% else %}<span class="last-poster">{{ forum.last_poster_name }}</span>{% endif %} - {{ forum.last_thread_date|reltimesince }}</div>
           {%- else -%}
           <em>{% trans %}This forum is empty{% endtrans %}</em>
           {%- endif %}
@@ -51,7 +51,7 @@
           {%- endif %}
           {%- else -%}
           <div class="thread-name">
-            <a href="{% url 'redirect' slug=forum.slug, forum=forum.id %}">{{ forum.redirect_domain() }}</a>
+            <a href="{{ url('redirect', slug=forum.slug, forum=forum.id) }}">{{ forum.redirect_domain() }}</a>
           </div>
           <div class="muted">{% trans count=forum.redirects, clicks=macros.wrap(forum.redirects|intcomma, 'span', 'class="last-poster"') %}{{ clicks }} click{% pluralize %}{{ clicks }} clicks{% endtrans %}</div>
           {%- endif %}
@@ -60,18 +60,18 @@
         {% if forum.subforums %}
         <div class="dropdown">
           {% if forum.subforums|length > 1 %}
-          <a href="{{ forum.type|url(slug=forum.slug, forum=forum.id) }}#subforums" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-chevron-down"></i> {% trans %}Subforums{% endtrans %}</a>
+          <a href="{{ url(forum.type, slug=forum.slug, forum=forum.id) }}#subforums" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-chevron-down"></i> {% trans %}Subforums{% endtrans %}</a>
           <div class="dropdown-menu" role="menu" aria-labelledby="dLabel">
             <div class="dropdown-shadow">
               <ul>
                 {% for subforum in forum.subforums %}
-                <li><a href="{{ subforum.type|url(slug=subforum.slug, forum=subforum.id) }}"><i class="icon-{% if subforum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %}"></i> {{ subforum.name }}</a></li>
+                <li><a href="{{ url(subforum.type, slug=subforum.slug, forum=subforum.id) }}"><i class="icon-{% if subforum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %}"></i> {{ subforum.name }}</a></li>
                 {% endfor %}
               </ul>
             </div>
           </div>
           {% else %}
-          <a href="{{ forum.subforums[0].type|url(slug=forum.subforums[0].slug, forum=forum.subforums[0].id) }}" class="subforum tooltip-top" title="{% trans forum=forum.subforums[0].name %}Go to the {{ forum }} subforum{% endtrans %}">{{ forum.subforums[0].name|short_string(16) }}</a>
+          <a href="{{ url(forum.subforums[0].type, slug=forum.subforums[0].slug, forum=forum.subforums[0].id) }}" class="subforum tooltip-top" title="{% trans forum=forum.subforums[0].name %}Go to the {{ forum }} subforum{% endtrans %}">{{ forum.subforums[0].name|short_string(16) }}</a>
           {% endif %}
         </div>
         {% endif%}

+ 1 - 1
templates/cranefly/error403.html

@@ -16,7 +16,7 @@
     {% endif %}
     <div class="error-protips">
       <a href="#" class="go-back"><i class="icon-arrow-left icon-white"></i> {% trans %}Return to previous page{% endtrans %}</a>
-      <a href="{% url 'index' %}"><i class="icon-home icon-white"></i> {% trans %}Return to board index{% endtrans %}</a>
+      <a href="{{ url('index') }}"><i class="icon-home icon-white"></i> {% trans %}Return to board index{% endtrans %}</a>
     </div>
   </div>
 </div>

+ 1 - 1
templates/cranefly/error403_banned.html

@@ -33,7 +33,7 @@
     <p class="error-ban-expires">{% trans ban_expires=ban.expires|date %}Your ban will expire on {{ ban_expires }}{% endtrans %}</p>
     {% endif %}
     <div class="error-protips">
-      <a href="{% url 'index' %}"><i class="icon-home icon-white"></i> {% trans %}Return to board index{% endtrans %}</a>
+      <a href="{{ url('index') }}"><i class="icon-home icon-white"></i> {% trans %}Return to board index{% endtrans %}</a>
     </div>
   </div>
 </div>

+ 1 - 1
templates/cranefly/error404.html

@@ -16,7 +16,7 @@
     {% endif %}
     <div class="error-protips">
       <a href="#" class="go-back"><i class="icon-arrow-left icon-white"></i> {% trans %}Return to previous page{% endtrans %}</a>
-      <a href="{% url 'index' %}"><i class="icon-home icon-white"></i> {% trans %}Return to board index{% endtrans %}</a>
+      <a href="{{ url('index') }}"><i class="icon-home icon-white"></i> {% trans %}Return to board index{% endtrans %}</a>
     </div>
   </div>
 </div>

+ 1 - 1
templates/cranefly/forum_map.html

@@ -53,7 +53,7 @@
     {{ draw_tree(branch ~ 'l') }}
     {%- else -%}
     {{ draw_tree(branch ~ 't') }}
-    {%- endif %}{% endif %} <a href="{{ forum.type|url(slug=forum.slug, forum=forum.id) }}">{{ forum.name }}</a></h3>
+    {%- endif %}{% endif %} <a href="{{ url(forum.type, slug=forum.slug, forum=forum.id) }}">{{ forum.name }}</a></h3>
   </div>
   {% for subforum in forum.subforums %}
     {% if depth %}

+ 14 - 14
templates/cranefly/index.html

@@ -2,7 +2,7 @@
 {% import "cranefly/macros.html" as macros with context %}
 
 {% block title %}{% if settings.board_index_title %}{{ settings.board_index_title }}{% else %}{{ settings.board_name }}{% endif %}{% endblock %}
-     
+
 {% block meta %}{% if settings.board_index_meta %}
     <meta name="description" content="{{ settings.board_index_meta }}">
 {%- endif %}{%- endblock %}
@@ -25,16 +25,16 @@
             <div class="forum-icon-wrap{% if forum.type == 'redirect' %} forum-icon-redirect{% elif not forum.is_read %} forum-icon-new{% endif %}"><i class="icon-{% if forum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %} icon-white"></i></div>
           </div>
           <div id="forum-{{ forum.id }}" class="forum-main">
-            <h3 class="forum-title{% if not forum.is_read %} forum-title-new{% endif %}"><a href="{{ forum.type|url(slug=forum.slug, forum=forum.id) }}">{{ forum.name }}</a></h3>
+            <h3 class="forum-title{% if not forum.is_read %} forum-title-new{% endif %}"><a href="{{ url(forum.type, slug=forum.slug, forum=forum.id) }}">{{ forum.name }}</a></h3>
             {% if forum.show_details %}
             <div class="forum-details">
               {% if forum.type != 'redirect' %}
               {% if acl.forums.can_browse(forum) and (acl.threads.can_read_threads(forum) == 2 or (acl.threads.can_read_threads(forum) == 1 and forum.last_poster_id == user.pk)) %}
               {% if forum.last_thread_id -%}
               <div class="thread-name">
-                <a href="{% url 'thread_new' thread=forum.last_thread_id, slug=forum.last_thread_slug %}"{% if forum.last_thread_name|length > 34 %} class="tooltip-top" title="{{ forum.last_thread_name }}"{% endif %}>{{ forum.last_thread_name|short_string(34) }}</a>
+                <a href="{{ url('thread_new', thread=forum.last_thread_id, slug=forum.last_thread_slug) }}"{% if forum.last_thread_name|length > 34 %} class="tooltip-top" title="{{ forum.last_thread_name }}"{% endif %}>{{ forum.last_thread_name|short_string(34) }}</a>
               </div>
-              <div class="muted">{% if forum.last_poster_id %}<a href="{% url 'user' user=forum.last_poster_id, username=forum.last_poster_slug %}" class="last-poster">{{ forum.last_poster_name }}</a>{% else %}<span class="last-poster">{{ forum.last_poster_name }}</span>{% endif %} - {{ forum.last_thread_date|reltimesince }}</div>
+              <div class="muted">{% if forum.last_poster_id %}<a href="{{ url('user', user=forum.last_poster_id, username=forum.last_poster_slug) }}" class="last-poster">{{ forum.last_poster_name }}</a>{% else %}<span class="last-poster">{{ forum.last_poster_name }}</span>{% endif %} - {{ forum.last_thread_date|reltimesince }}</div>
               {%- else -%}
               <em>{% trans %}This forum is empty{% endtrans %}</em>
               {%- endif %}
@@ -43,7 +43,7 @@
               {%- endif %}
               {%- else -%}
               <div class="thread-name">
-                <a href="{% url 'redirect' slug=forum.slug, forum=forum.id %}">{{ forum.redirect_domain() }}</a>
+                <a href="{{ url('redirect', slug=forum.slug, forum=forum.id) }}">{{ forum.redirect_domain() }}</a>
               </div>
               <div class="muted">{% trans count=forum.redirects, clicks=macros.wrap(forum.redirects|intcomma, 'span', 'class="last-poster"') %}{{ clicks }} click{% pluralize %}{{ clicks }} clicks{% endtrans %}</div>
               {%- endif %}
@@ -52,18 +52,18 @@
             {% if forum.subforums %}
             <div class="dropdown">
               {% if forum.subforums|length > 1 %}
-              <a href="{{ forum.type|url(slug=forum.slug, forum=forum.id) }}#subforums" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-chevron-down"></i> {% trans %}Subforums{% endtrans %}</a>
+              <a href="{{ url(forum.type, slug=forum.slug, forum=forum.id) }}#subforums" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-chevron-down"></i> {% trans %}Subforums{% endtrans %}</a>
               <div class="dropdown-menu" role="menu" aria-labelledby="dLabel">
                 <div class="dropdown-shadow">
                   <ul>
                     {% for subforum in forum.subforums %}
-                    <li><a href="{{ subforum.type|url(slug=subforum.slug, forum=subforum.id) }}"><i class="icon-{% if subforum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %}"></i> {{ subforum.name }}</a></li>
+                    <li><a href="{{ url(subforum.type, slug=subforum.slug, forum=subforum.id) }}"><i class="icon-{% if subforum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %}"></i> {{ subforum.name }}</a></li>
                     {% endfor %}
                   </ul>
                 </div>
               </div>
               {% else %}
-              <a href="{{ forum.subforums[0].type|url(slug=forum.subforums[0].slug, forum=forum.subforums[0].id) }}" class="subforum tooltip-top" title="{% trans forum=forum.subforums[0].name %}Go to the {{ forum }} subforum{% endtrans %}">{{ forum.subforums[0].name|short_string(16) }}</a>
+              <a href="{{ url(forum.subforums[0].type, slug=forum.subforums[0].slug, forum=forum.subforums[0].id) }}" class="subforum tooltip-top" title="{% trans forum=forum.subforums[0].name %}Go to the {{ forum }} subforum{% endtrans %}">{{ forum.subforums[0].name|short_string(16) }}</a>
               {% endif %}
             </div>
             {% endif%}
@@ -95,15 +95,15 @@
     <div class="index-ranks-list">
       {% for rank in ranks_online %}{% if rank.online %}
       <div class="inder-rank{% if rank.style %} index-rank-{{ rank.style }}{% endif %}">
-        <h3>{% if rank.slug %}<a href="{% url 'users' slug=rank.slug %}">{% endif %}{% trans rank_name=_(rank.name) %}{{ rank_name }} Online{% endtrans %}{% if rank.slug %}</a>{% endif %}</h3>
+        <h3>{% if rank.slug %}<a href="{{ url('users', slug=rank.slug) }}">{% endif %}{% trans rank_name=_(rank.name) %}{{ rank_name }} Online{% endtrans %}{% if rank.slug %}</a>{% endif %}</h3>
         <ul class="unstyled">
           {% for online in rank.online %}
           <li>
             <img src="{{ online.get_avatar(24) }}" alt="" class="avatar-small">
-            <a href="{% url 'user' username=online.username_slug, user=online.pk %}" class="user-name">{{ online.username }}</a>
+            <a href="{{ url('user', username=online.username_slug, user=online.pk) }}" class="user-name">{{ online.username }}</a>
             {% if rank.title or online.title %}
             {% if rank.slug -%}
-            <a href="{% url 'users' slug=rank.slug %}" class="label">{% if online.title %}{{ online.title }}{% else %}{{ _(rank.title) }}{% endif %}</a>
+            <a href="{{ url('users', slug=rank.slug) }}" class="label">{% if online.title %}{{ online.title }}{% else %}{{ _(rank.title) }}{% endif %}</a>
             {%- else -%}
             <span class="label">{% if online.title %}{{ online.title }}{% else %}{{ _(rank.title) }}{% endif %}</span>
             {% endif %}
@@ -124,8 +124,8 @@
       <ul class="unstyled">
         {% for thread in popular_threads %}
         <li>
-          <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="index-popular-thread{% if thread.name|length > 42 %} tooltip-top{% endif %}"{% if thread.name|length > 42 %} title="{{ thread.name }}"{% endif %}>{{ thread.name|short_string(42) }}</a>
-          <div class="muted"><a href="{% url 'forum' forum=thread.forum_id, slug=thread.forum_slug %}">{{ thread.forum_name }}</a> - {{ thread.last|reltimesince }}</div>
+          <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="index-popular-thread{% if thread.name|length > 42 %} tooltip-top{% endif %}"{% if thread.name|length > 42 %} title="{{ thread.name }}"{% endif %}>{{ thread.name|short_string(42) }}</a>
+          <div class="muted"><a href="{{ url('forum', forum=thread.forum_id, slug=thread.forum_slug) }}">{{ thread.forum_name }}</a> - {{ thread.last|reltimesince }}</div>
         </li>
         {% endfor %}
       </ul>
@@ -156,7 +156,7 @@
     {{ hook_after_home_sidepanel_forum_stats|safe }}
 
     {% if user.is_authenticated() %}
-    <form action="{% url 'read_all' %}" method="post" class="index-forums-read-all">
+    <form action="{{ url('read_all') }}" method="post" class="index-forums-read-all">
       <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
       <button type="submit" class="btn btn-link"><i class="icon-ok"></i> {% trans %}Mark forums read{% endtrans %}</button>
     </form>

+ 32 - 32
templates/cranefly/layout.html

@@ -6,9 +6,9 @@
   <div class="navbar navbar-header navbar-static-top">
     <div class="navbar-inner">
       <div class="container">
-        <a href="{% url 'index' %}" class="brand">{% if settings.board_header %}{{ settings.board_header }}{% else %}{{ settings.board_name }}{% endif %}</a>
+        <a href="{{ url('index') }}" class="brand">{% if settings.board_header %}{{ settings.board_header }}{% else %}{{ settings.board_name }}{% endif %}</a>
         {% if acl.search.can_search() and not user.is_crawler() %}
-        <form action="{% url 'search' %}" method="post" class="navbar-form pull-left">
+        <form action="{{ url('search') }}" method="post" class="navbar-form pull-left">
           <div class="navbar-search-form">
             <div id="navbar-search" class="navbar-search-border">
               <div class="navbar-search-text">
@@ -59,15 +59,15 @@
         </form>
         {% endif %}
         <ul class="nav navbar-blocks pull-left">
-          <li><a href="{% url 'index' %}" title="{% trans %}Forum Home{% endtrans %}" class="tooltip-bottom"><i class="icon-th-list"></i></a></li>
+          <li><a href="{{ url('index') }}" title="{% trans %}Forum Home{% endtrans %}" class="tooltip-bottom"><i class="icon-th-list"></i></a></li>
           {{ hook_primary_menu_prepend|safe }}
-          <li><a href="{% url 'popular_threads' %}" title="{% trans %}Popular Threads{% endtrans %}" class="hot tooltip-bottom"><i class="icon-fire"></i></a></li>
-          <li><a href="{% url 'new_threads' %}" title="{% trans %}New Threads{% endtrans %}" class="fresh tooltip-bottom"><i class="icon-leaf"></i></a></li>{% if not user.crawler %}
+          <li><a href="{{ url('popular_threads') }}" title="{% trans %}Popular Threads{% endtrans %}" class="hot tooltip-bottom"><i class="icon-fire"></i></a></li>
+          <li><a href="{{ url('new_threads') }}" title="{% trans %}New Threads{% endtrans %}" class="fresh tooltip-bottom"><i class="icon-leaf"></i></a></li>{% if not user.crawler %}
           {% if 1==2 and acl.search.can_search() and not user.is_crawler() %}
-          <li><a href="{% url 'search' %}" title="{% trans %}Search Forums{% endtrans %}" class="tooltip-bottom"><i class="icon-search"></i></a></li>{% endif %}
+          <li><a href="{{ url('search') }}" title="{% trans %}Search Forums{% endtrans %}" class="tooltip-bottom"><i class="icon-search"></i></a></li>{% endif %}
           {% endif %}
-          <li><a href="{% url 'users' %}" title="{% trans %}Browse Users{% endtrans %}" class="tooltip-bottom"><i class="icon-user"></i></a></li>
-          {% if settings.tos_url or settings.tos_content %}<li><a href="{% if settings.tos_url %}{{ settings.tos_url }}{% else %}{% url 'tos' %}{% endif %}" title="{% if settings.tos_title %}{{ settings.tos_title }}{% else %}{% trans %}Forum Terms of Service{% endtrans %}{% endif %}" class="tooltip-bottom"><i class="icon-certificate"></i></a></li>{% endif %}
+          <li><a href="{{ url('users') }}" title="{% trans %}Browse Users{% endtrans %}" class="tooltip-bottom"><i class="icon-user"></i></a></li>
+          {% if settings.tos_url or settings.tos_content %}<li><a href="{% if settings.tos_url %}{{ settings.tos_url }}{% else %}{{ url('tos') }}{% endif %}" title="{% if settings.tos_title %}{{ settings.tos_title }}{% else %}{% trans %}Forum Terms of Service{% endtrans %}{% endif %}" class="tooltip-bottom"><i class="icon-certificate"></i></a></li>{% endif %}
           {{ hook_primary_menu_append|safe }}
         </ul>
         {% if not user.is_crawler() %}
@@ -75,60 +75,60 @@
         <ul id="fancy-user-nav" class="nav navbar-blocks navbar-compact pull-right">
           {{ hook_user_menu_important_prepend|safe }}
           {% if acl.reports.can_handle() and monitor.reported_posts %}
-          <li><a href="{% url 'reports' %}" title="{% trans %}There are unresolved reports!{% endtrans %}" class="tooltip-bottom"><i class="icon-fire"></i><span class="label label-important">{{ monitor.reported_posts }}</span></a></li>
+          <li><a href="{{ url('reports') }}" title="{% trans %}There are unresolved reports!{% endtrans %}" class="tooltip-bottom"><i class="icon-fire"></i><span class="label label-important">{{ monitor.reported_posts }}</span></a></li>
           {% endif %}
           {% if user.alerts %}
-          <li><a href="{% url 'alerts' %}" title="{% trans %}You have new notifications!{% endtrans %}" class="tooltip-bottom"><i class="icon-asterisk"></i><span class="label label-important">{{ user.alerts }}</span></a></li>
+          <li><a href="{{ url('alerts') }}" title="{% trans %}You have new notifications!{% endtrans %}" class="tooltip-bottom"><i class="icon-asterisk"></i><span class="label label-important">{{ user.alerts }}</span></a></li>
           {% endif %}
           {% if settings.enable_private_threads and acl.private_threads.can_participate() and user.unread_pds %}
-          <li><a href="{% url 'private_threads' %}" title="{% trans %}There are unread Private Threads!{% endtrans %}" class="tooltip-bottom"><i class="icon-inbox"></i><span class="label label-important">{{ user.unread_pds }}</span></a></li>
+          <li><a href="{{ url('private_threads') }}" title="{% trans %}There are unread Private Threads!{% endtrans %}" class="tooltip-bottom"><i class="icon-inbox"></i><span class="label label-important">{{ user.unread_pds }}</span></a></li>
           {% endif %}
           {{ hook_user_menu_important_append|safe }}
           <li class="user-profile dropdown">
-            <a href="{% url 'user' user=user.id, username=user.username_slug %}" class="dropdown-toggle" data-toggle="dropdown"><div>{{ user.username }} <img src="{{ user.get_avatar(28) }}" alt=""><span class="caret-border"><b class="caret"></b></span></div></a>
+            <a href="{{ url('user', user=user.id, username=user.username_slug) }}" class="dropdown-toggle" data-toggle="dropdown"><div>{{ user.username }} <img src="{{ user.get_avatar(28) }}" alt=""><span class="caret-border"><b class="caret"></b></span></div></a>
             <ul class="dropdown-menu">
-              <li><a href="{% url 'user' user=user.id, username=user.username_slug %}"><i class="icon-user"></i> {% trans %}Your profile{% endtrans %}</a></li>
-              <li><a href="{% url 'usercp' %}"><i class="icon-cog"></i> {% trans %}Change options{% endtrans %}</a></li>
+              <li><a href="{{ url('user', user=user.id, username=user.username_slug) }}"><i class="icon-user"></i> {% trans %}Your profile{% endtrans %}</a></li>
+              <li><a href="{{ url('usercp') }}"><i class="icon-cog"></i> {% trans %}Change options{% endtrans %}</a></li>
               <li role="presentation" class="divider"></li>
               {% if acl.reports.can_handle() %}
-              <li><a href="{% url 'reports' %}">{% if monitor.reported_posts %}<span class="label">{{ monitor.reported_posts }}</span>{% endif %}<i class="icon-fire"></i> {% trans %}Reported Posts{% endtrans %}</a></li>
+              <li><a href="{{ url('reports') }}">{% if monitor.reported_posts %}<span class="label">{{ monitor.reported_posts }}</span>{% endif %}<i class="icon-fire"></i> {% trans %}Reported Posts{% endtrans %}</a></li>
               {% endif %}
-              <li><a href="{% url 'alerts' %}">{% if user.alerts %}<span class="label">{{ user.alerts }}</span>{% endif %}<i class="icon-asterisk"></i> {% trans %}Notifications{% endtrans %}</a></li>
+              <li><a href="{{ url('alerts') }}">{% if user.alerts %}<span class="label">{{ user.alerts }}</span>{% endif %}<i class="icon-asterisk"></i> {% trans %}Notifications{% endtrans %}</a></li>
               {{ hook_user_menu_dropdown_prepend|safe }}
               {% if settings.enable_private_threads and acl.private_threads.can_participate() %}
-              <li><a href="{% url 'private_threads' %}">{% if user.unread_pds %}<span class="label">{{ user.unread_pds }}</span>{% endif %}<i class="icon-inbox"></i> {% trans %}Private Threads{% endtrans %}</a></li>
+              <li><a href="{{ url('private_threads') }}">{% if user.unread_pds %}<span class="label">{{ user.unread_pds }}</span>{% endif %}<i class="icon-inbox"></i> {% trans %}Private Threads{% endtrans %}</a></li>
               {% endif %}
-              <li><a href="{% url 'newsfeed' %}"><i class="icon-signal"></i> {% trans %}News Feed{% endtrans %}</a></li>
-              <li><a href="{% url 'watched_threads' %}"><i class="icon-bookmark"></i> {% trans %}Watched Threads{% endtrans %}</a></li>
+              <li><a href="{{ url('newsfeed') }}"><i class="icon-signal"></i> {% trans %}News Feed{% endtrans %}</a></li>
+              <li><a href="{{ url('watched_threads') }}"><i class="icon-bookmark"></i> {% trans %}Watched Threads{% endtrans %}</a></li>
               {{ hook_user_menu_dropdown_prepend|safe }}
               <li role="presentation" class="divider"></li>
-              <li><form action="{% url 'sign_out' %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn btn-link danger"><i class="icon-off"></i> {% trans %}Sign out{% endtrans %}</button></form></li>
+              <li><form action="{{ url('sign_out') }}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn btn-link danger"><i class="icon-off"></i> {% trans %}Sign out{% endtrans %}</button></form></li>
             </ul>
           </li>
         </ul>
         <noscript>
           <ul class="nav navbar-blocks pull-right">
             {{ hook_user_menu_prepend|safe }}
-            <li><a href="{% url 'alerts' %}" title="{% if user.alerts %}{% trans %}You have new notifications!{% endtrans %}{% else %}{% trans %}Your Notifications{% endtrans %}{% endif %}" class="tooltip-bottom"><i class="icon-asterisk"></i>{% if user.alerts %}<span class="label label-important">{{ user.alerts }}</span>{% endif %}</a></li>
+            <li><a href="{{ url('alerts') }}" title="{% if user.alerts %}{% trans %}You have new notifications!{% endtrans %}{% else %}{% trans %}Your Notifications{% endtrans %}{% endif %}" class="tooltip-bottom"><i class="icon-asterisk"></i>{% if user.alerts %}<span class="label label-important">{{ user.alerts }}</span>{% endif %}</a></li>
             {% if acl.reports.can_handle() %}
-            <li><a href="{% url 'reports' %}" title="{% if monitor.reported_posts %}{% trans %}There are unresolved reports!{% endtrans %}{% else %}{% trans %}Reports{% endtrans %}{% endif %}" class="tooltip-bottom"><i class="icon-fire"></i>{% if monitor.reported_posts %}<span class="label label-important">{{ monitor.reported_posts }}</span>{% endif %}</a></li>
+            <li><a href="{{ url('reports') }}" title="{% if monitor.reported_posts %}{% trans %}There are unresolved reports!{% endtrans %}{% else %}{% trans %}Reports{% endtrans %}{% endif %}" class="tooltip-bottom"><i class="icon-fire"></i>{% if monitor.reported_posts %}<span class="label label-important">{{ monitor.reported_posts }}</span>{% endif %}</a></li>
             {% endif %}
             {% if settings.enable_private_threads and acl.private_threads.can_participate() %}
-            <li><a href="{% url 'private_threads' %}" title="{% if user.unread_pds %}{% trans %}There are unread Private Threads!{% endtrans %}{% else %}{% trans %}Your Private Threads{% endtrans %}{% endif %}" class="tooltip-bottom"><i class="icon-inbox"></i>{% if user.unread_pds %}<span class="label label-important">{{ user.unread_pds }}</span>{% endif %}</a></li>
+            <li><a href="{{ url('private_threads') }}" title="{% if user.unread_pds %}{% trans %}There are unread Private Threads!{% endtrans %}{% else %}{% trans %}Your Private Threads{% endtrans %}{% endif %}" class="tooltip-bottom"><i class="icon-inbox"></i>{% if user.unread_pds %}<span class="label label-important">{{ user.unread_pds }}</span>{% endif %}</a></li>
             {% endif %}
-            <li><a href="{% url 'newsfeed' %}" title="{% trans %}Your News Feed{% endtrans %}" class="tooltip-bottom"><i class="icon-signal"></i></a></li>
-            <li><a href="{% url 'watched_threads' %}" title="{% trans %}Threads you are watching{% endtrans %}" class="tooltip-bottom"><i class="icon-bookmark"></i></a></li>
-            <li><a href="{% url 'usercp' %}" title="{% trans %}Edit your profile options{% endtrans %}" class="tooltip-bottom"><i class="icon-cog"></i></a></li>
+            <li><a href="{{ url('newsfeed') }}" title="{% trans %}Your News Feed{% endtrans %}" class="tooltip-bottom"><i class="icon-signal"></i></a></li>
+            <li><a href="{{ url('watched_threads') }}" title="{% trans %}Threads you are watching{% endtrans %}" class="tooltip-bottom"><i class="icon-bookmark"></i></a></li>
+            <li><a href="{{ url('usercp') }}" title="{% trans %}Edit your profile options{% endtrans %}" class="tooltip-bottom"><i class="icon-cog"></i></a></li>
             {{ hook_user_menu_append|safe }}
-            <li class="user-profile"><a href="{% url 'user' user=user.id, username=user.username_slug %}" title="{% trans %}Go to your profile{% endtrans %}" class="tooltip-bottom"><div><img src="{{ user.get_avatar(28) }}" alt=""> {{ user.username }}</div></a></li>
-            <li><form action="{% url 'sign_out' %}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" title="{% trans %}Sign Out and browse as guest{% endtrans %}" class="btn btn-link danger tooltip-bottom"><i class="icon-off"></i></button></form></li>
+            <li class="user-profile"><a href="{{ url('user', user=user.id, username=user.username_slug) }}" title="{% trans %}Go to your profile{% endtrans %}" class="tooltip-bottom"><div><img src="{{ user.get_avatar(28) }}" alt=""> {{ user.username }}</div></a></li>
+            <li><form action="{{ url('sign_out') }}" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" title="{% trans %}Sign Out and browse as guest{% endtrans %}" class="btn btn-link danger tooltip-bottom"><i class="icon-off"></i></button></form></li>
           </ul>
         </noscript>
         {% else %}
         <ul class="nav navbar-user-nav pull-right">
           {{ hook_guest_menu_prepend|safe }}
-          <li><a href="{% url 'sign_in' %}" title="{% trans %}Sign In to Your Account{% endtrans %}" class="tooltip-bottom btn btn-danger"><i class="icon-check"></i> {% trans %}Sign In{% endtrans %}</a></li>{% if settings.account_activation != 'block' %}
-          <li><a href="{% url 'register' %}" title="{% trans %}Register new account{% endtrans %}" class="tooltip-bottom btn btn-inverse"><i class="icon-edit"></i> {% trans %}Register{% endtrans %}</a></li>{% endif %}
+          <li><a href="{{ url('sign_in') }}" title="{% trans %}Sign In to Your Account{% endtrans %}" class="tooltip-bottom btn btn-danger"><i class="icon-check"></i> {% trans %}Sign In{% endtrans %}</a></li>{% if settings.account_activation != 'block' %}
+          <li><a href="{{ url('register') }}" title="{% trans %}Register new account{% endtrans %}" class="tooltip-bottom btn btn-inverse"><i class="icon-edit"></i> {% trans %}Register{% endtrans %}</a></li>{% endif %}
           {{ hook_guest_menu_append|safe }}
         </ul>
         {% endif %}
@@ -151,9 +151,9 @@
 <footer>
   <div class="container">
     <ul class="breadcrumb">
-      {% block breadcrumb %}<li class="first"><a href="{% url 'index' %}">{{ settings.board_name }}</a>{% endblock %}</li>
+      {% block breadcrumb %}<li class="first"><a href="{{ url('index') }}">{{ settings.board_name }}</a>{% endblock %}</li>
       {{ hook_foot_menu_prepend|safe }}
-      <li class="pull-right"><i class="icon-move"></i> <a href="{% url 'forum_map' %}">{% trans %}Forum Map{% endtrans %}</a></li>
+      <li class="pull-right"><i class="icon-move"></i> <a href="{{ url('forum_map') }}">{% trans %}Forum Map{% endtrans %}</a></li>
       {{ hook_foot_menu_append|safe }}
     </ul>
     <hr>

+ 1 - 1
templates/cranefly/macros.html

@@ -47,7 +47,7 @@ itemprop="breadcrumb"
 
 {% macro parents_list(forums) -%}
 {% for forum in forums %}
-<li><a href="{% if loop.first %}{% url 'index' %}#{{ forum.slug }}{% else %}{{ forum.type|url(forum=forum.pk, slug=forum.slug) }}{% endif %}">{{ forum.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{% if loop.first %}{{ url('index') }}#{{ forum.slug }}{% else %}{{ url(forum.type, forum=forum.pk, slug=forum.slug) }}{% endif %}">{{ forum.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {% endfor %}
 {%- endmacro %}
 

+ 9 - 9
templates/cranefly/new_threads.html

@@ -27,12 +27,12 @@
       <div class="row-fluid">
         <div class="span7">
           {% if thread.is_read %}
-          <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
           {% else %}
-          <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
           {% endif %}
 
-          <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="thread-name">{{ thread.name }}</a>
+          <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="thread-name">{{ thread.name }}</a>
 
           {{ macros.thread_flags(thread) }}
           
@@ -46,7 +46,7 @@
           {% if settings.avatars_on_threads_list %}
           <div class="thread-last-avatar">
             {% if thread.last_poster_id %}
-            <a href="{% url 'user' user=thread.last_poster.pk, username=thread.last_poster.username_slug %}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
+            <a href="{{ url('user', user=thread.last_poster.pk, username=thread.last_poster.username_slug) }}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
             {% else %}
             <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
             {% endif %}
@@ -80,15 +80,15 @@
 {%- endmacro %}
 
 {% macro thread_starter(thread) -%}
-{% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
+{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro thread_forum(thread) -%}
-<a href="{% url 'forum' forum=thread.forum_id, slug=thread.forum.slug %}" class="forum-link">{{ thread.forum.name }}</a>
+<a href="{{ url('forum', forum=thread.forum_id, slug=thread.forum.slug) }}" class="forum-link">{{ thread.forum.name }}</a>
 {%- endmacro %}
 
 {% macro thread_reply(thread) -%}
-{% if thread.last_poster_id %}<a href="{% url 'user' user=thread.last_poster_id, username=thread.last_poster_slug %}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
+{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro pager() -%}
@@ -96,8 +96,8 @@
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'new_threads' page=pagination['prev'] %}{% else %}{% url 'new_threads' %}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'new_threads' page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('new_threads', page=pagination['prev']) }}{% else %}{{ url('new_threads') }}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('new_threads', page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 5 - 5
templates/cranefly/newsfeed.html

@@ -17,11 +17,11 @@
   <div class="news-feed">
     {% for item in posts %}
     <div class="media">
-      <a href="{% url 'user' user=item.user.pk, username=item.user.username_slug %}" class="pull-left">
+      <a href="{{ url('user', user=item.user.pk, username=item.user.username_slug) }}" class="pull-left">
         <img class="media-object" src="{{ item.user.get_avatar(52) }}">
       </a>
       <div class="media-body">
-        <a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}" class="post-preview">{{ item.post_preparsed|markdown_short(300) }}</a>
+        <a href="{{ url('thread_find', thread=item.thread.pk, slug=item.thread.slug, post=item.pk) }}" class="post-preview">{{ item.post_preparsed|markdown_short(300) }}</a>
         <div class="media-footer">{% if item.thread.start_post_id == item.pk -%}
         {% trans thread=thread(item), forum=forum(item.forum), user=username(item.user), date=item.date|reltimesince|low %}Thread {{ thread }} posted in {{ forum }} by {{ user }} {{ date }}{% endtrans %}
         {%- else -%}
@@ -42,13 +42,13 @@
 {% endblock %}
 
 {% macro thread(item) -%}
-<a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}" class="thread-link">{{ item.thread.name }}</a>
+<a href="{{ url('thread_find', thread=item.thread.pk, slug=item.thread.slug, post=item.pk) }}" class="thread-link">{{ item.thread.name }}</a>
 {%- endmacro %}
 
 {% macro forum(forum) -%}
-<a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}" class="forum-link">{{ forum.name }}</a>
+<a href="{{ url('forum', forum=forum.pk, slug=forum.slug) }}" class="forum-link">{{ forum.name }}</a>
 {%- endmacro %}
 
 {% macro username(user) -%}
-<a href="{% url 'user' user=user.pk, username=user.username_slug %}" class="user-link">{{ user.username }}</a>
+<a href="{{ url('user', user=user.pk, username=user.username_slug) }}" class="user-link">{{ user.username }}</a>
 {%- endmacro %}

+ 9 - 9
templates/cranefly/popular_threads.html

@@ -27,14 +27,14 @@
       <div class="row-fluid">
         <div class="span7">
           {% if thread.is_read %}
-          <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
           {% else %}
-          <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
           {% endif %}
 
           {{ macros.thread_flags(thread) }}
 
-          <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="thread-name">{{ thread.name }}</a>
+          <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="thread-name">{{ thread.name }}</a>
           
           <div class="thread-details">
             {% trans user=thread_starter(thread), forum=thread_forum(thread), start=thread.start|reltimesince|low %}by {{ user }} in {{ forum }} {{ start }}{% endtrans %}
@@ -46,7 +46,7 @@
           {% if settings.avatars_on_threads_list %}
           <div class="thread-last-avatar">
             {% if thread.last_poster_id %}
-            <a href="{% url 'user' user=thread.last_poster.pk, username=thread.last_poster.username_slug %}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
+            <a href="{{ url('user', user=thread.last_poster.pk, username=thread.last_poster.username_slug) }}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
             {% else %}
             <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
             {% endif %}
@@ -80,15 +80,15 @@
 {%- endmacro %}
 
 {% macro thread_starter(thread) -%}
-{% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
+{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro thread_forum(thread) -%}
-<a href="{% url 'forum' forum=thread.forum_id, slug=thread.forum.slug %}" class="forum-link">{{ thread.forum.name }}</a>
+<a href="{{ url('forum', forum=thread.forum_id, slug=thread.forum.slug) }}" class="forum-link">{{ thread.forum.name }}</a>
 {%- endmacro %}
 
 {% macro thread_reply(thread) -%}
-{% if thread.last_poster_id %}<a href="{% url 'user' user=thread.last_poster_id, username=thread.last_poster_slug %}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
+{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro pager() -%}
@@ -96,8 +96,8 @@
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'popular_threads' page=pagination['prev'] %}{% else %}{% url 'popular_threads' %}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'popular_threads' page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('popular_threads', page=pagination['prev']) }}{% else %}{{ url('popular_threads') }}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('popular_threads', page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 8 - 8
templates/cranefly/private_threads/changelog.html

@@ -4,8 +4,8 @@
 {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Changelog") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_threads' %}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('private_threads') }}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('private_thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}
 {%- endblock %}
 
@@ -18,8 +18,8 @@
     </ul>
     <h1>{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %} <small>{{ thread.name }}</small></h1>
     <ul class="unstyled header-stats">
-      <li><i class="icon-time"></i> <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
       <li><i class="icon-pencil"></i> {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</li>
       {% if post.protected %}<li><i class="icon-lock"></i> {% trans %}Protected{% endtrans %}</li>{% endif %}
     </ul>
@@ -45,13 +45,13 @@
             </span>
           </td>
           <td>
-            <a href="{% url 'private_thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}" class="change-no">#{{ loop.revindex }}</a>
+            <a href="{{ url('private_thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}" class="change-no">#{{ loop.revindex }}</a>
             {% if edit.reason %}
             <div class="change-reason">
-              <a href="{% url 'private_thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}">{{ edit.reason }}</a>
+              <a href="{{ url('private_thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}">{{ edit.reason }}</a>
             </div>{% endif %}
             <div class="change-description">
-              <a href="{% url 'private_thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}">
+              <a href="{{ url('private_thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}">
               {% if edit.change != 0 %}{% if edit.change > 0 -%}
               {% trans chars=edit.change %}Added one character to post.{% pluralize %}Added {{ chars }} characters to post.{% endtrans %}
               {%- elif edit.change < 0 -%}
@@ -77,5 +77,5 @@
 
 
 {% macro edit_user(edit) -%}
-{% if edit.user_id %}<a href="{% url 'user' user=edit.user_id, username=edit.user_slug %}">{{ edit.user_name }}</a>{% else %}{{ edit.user_name }}{% endif %}
+{% if edit.user_id %}<a href="{{ url('user', user=edit.user_id, username=edit.user_slug) }}">{{ edit.user_name }}</a>{% else %}{{ edit.user_name }}{% endif %}
 {%- endmacro %}

+ 8 - 8
templates/cranefly/private_threads/changelog_diff.html

@@ -4,9 +4,9 @@
 {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Changelog") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_threads' %}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('private_threads') }}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('private_thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('private_thread_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %}
 {%- endblock %}
 
@@ -19,8 +19,8 @@
     </ul>
     <h1>{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %} <small>{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</small></h1>
     <ul class="unstyled header-stats pull-left">
-      <li><i class="icon-time"></i> <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if change.user_id %}<a href="{% url 'user' user=change.user_id, username=change.user_slug %}">{{ change.user_name }}</a>{% else %}{{ change.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if change.user_id %}<a href="{{ url('user', user=change.user_id, username=change.user_slug) }}">{{ change.user_name }}</a>{% else %}{{ change.user_name }}{% endif %}</li>
       {% if acl.users.can_see_users_trails() %}
       <li><i class="icon-globe"></i> {{ change.ip }}</li>
       <li><i class="icon-qrcode"></i> {{ change.agent }}</li>
@@ -50,7 +50,7 @@
     <div class="diff-extra">
       {{ pager() }}
       {% if user.is_authenticated() and acl.threads.can_make_revert(forum, thread) %}
-      <form class="form-inline pull-right" action="{% url 'private_thread_changelog_revert' thread=thread.pk, slug=thread.slug, post=post.pk, change=change.pk %}" method="post">
+      <form class="form-inline pull-right" action="{{ url('private_thread_changelog_revert', thread=thread.pk, slug=thread.slug, post=post.pk, change=change.pk) }}" method="post">
         <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
         <button type="submit" class="btn btn-danger">{% trans %}Revert this edit{% endtrans %}</button></li>
       </form>
@@ -87,8 +87,8 @@
 {% if prev or prev %}
 <div class="pagination pull-left">
   <ul>
-    {% if prev %}<li><a href="{% url 'private_thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=prev.pk %}"><i class="icon-chevron-left"></i> {{ prev.date|reldate }}</a></li>{% endif %}
-    {% if next %}<li><a href="{% url 'private_thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=next.pk %}">{{ next.date|reldate }} <i class="icon-chevron-right"></i></a></li>{% endif %}
+    {% if prev %}<li><a href="{{ url('private_thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=prev.pk) }}"><i class="icon-chevron-left"></i> {{ prev.date|reldate }}</a></li>{% endif %}
+    {% if next %}<li><a href="{{ url('private_thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=next.pk) }}">{{ next.date|reldate }} <i class="icon-chevron-right"></i></a></li>{% endif %}
   </ul>
 </div>
 {% endif %}

+ 4 - 4
templates/cranefly/private_threads/details.html

@@ -4,8 +4,8 @@
 {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Info") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_threads' %}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('private_threads') }}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('private_thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans post=post.pk %}Post #{{ post }} Info{% endtrans %}
 {%- endblock %}
 
@@ -18,8 +18,8 @@
     </ul>
     <h1>{% trans post=post.pk %}Post #{{ post }} Info{% endtrans %} <small>{{ thread.name }}</small></h1>
     <ul class="unstyled header-stats">
-      <li><i class="icon-time"></i> <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
       <li><i class="icon-pencil"></i> {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</li>
       {% if post.protected %}<li><i class="icon-lock"></i> {% trans %}Protected{% endtrans %}</li>{% endif %}
     </ul>

+ 11 - 11
templates/cranefly/private_threads/list.html

@@ -30,7 +30,7 @@
   <div class="forum-threads-extra extra-top">
     {{ pager() }}
     {% if acl.threads.can_start_threads(forum) %}
-    <a href="{% url 'private_thread_start' %}" class="btn btn-inverse pull-right"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a>
+    <a href="{{ url('private_thread_start') }}" class="btn btn-inverse pull-right"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a>
     {% endif %}
   </div>
 
@@ -53,12 +53,12 @@
       <div class="row-fluid">
         <div class="span7">
           {% if thread.is_read %}
-          <a href="{% url 'private_thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
+          <a href="{{ url('private_thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
           {% else %}
-          <a href="{% url 'private_thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
+          <a href="{{ url('private_thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
           {% endif %}
 
-          <a href="{% url 'private_thread' thread=thread.pk, slug=thread.slug %}" class="thread-name">{{ thread.name }}</a>
+          <a href="{{ url('private_thread', thread=thread.pk, slug=thread.slug) }}" class="thread-name">{{ thread.name }}</a>
 
           {{ macros.thread_flags(thread) }}
 
@@ -72,7 +72,7 @@
           {% if settings.avatars_on_threads_list %}
           <div class="thread-last-avatar">
             {% if thread.last_poster_id %}
-            <a href="{% url 'user' user=thread.last_poster.pk, username=thread.last_poster.username_slug %}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
+            <a href="{{ url('user', user=thread.last_poster.pk, username=thread.last_poster.username_slug) }}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
             {% else %}
             <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
             {% endif %}
@@ -111,7 +111,7 @@
   <div class="forum-threads-extra">
     {{ pager() }}
     {% if acl.threads.can_start_threads(forum) %}
-    <a href="{% url 'private_thread_start' %}" class="btn btn-inverse pull-right"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a>
+    <a href="{{ url('private_thread_start') }}" class="btn btn-inverse pull-right"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a>
     {% endif %}
   </div>
 
@@ -128,11 +128,11 @@
 {%- endmacro %}
 
 {% macro thread_starter(thread) -%}
-{% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
+{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro thread_reply(thread) -%}
-{% if thread.last_poster_id %}<a href="{% url 'user' user=thread.last_poster_id, username=thread.last_poster_slug %}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
+{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro pager() %}
@@ -140,9 +140,9 @@
 <div class="pagination pull-left">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'private_threads' %}" class="tooltip-top" title="{% trans %}First Page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'private_threads' page=pagination['prev'] %}{% else %}{% url 'private_threads' %}{% endif %}" class="tooltip-top" title="{% trans %}Newest Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'private_threads' page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('private_threads') }}" class="tooltip-top" title="{% trans %}First Page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('private_threads', page=pagination['prev']) }}{% else %}{{ url('private_threads') }}{% endif %}" class="tooltip-top" title="{% trans %}Newest Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('private_threads', page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 12 - 12
templates/cranefly/private_threads/posting.html

@@ -10,8 +10,8 @@
 {%- endif %}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_threads' %}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-{% if thread %}<li><a href="{% url 'private_thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>{% endif %}
+<li><a href="{{ url('private_threads') }}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+{% if thread %}<li><a href="{{ url('private_thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>{% endif %}
 <li class="active">{{ get_title() }}
 {%- endblock %}
 
@@ -109,17 +109,17 @@
 
 {% macro get_action() -%}
 {% if action == 'new_thread' -%}
-{% url 'private_thread_start' %}
+{{ url('private_thread_start') }}
 {%- elif action == 'edit_thread' -%}
-{% url 'private_thread_edit' thread=thread.pk, slug=thread.slug %}
+{{ url('private_thread_edit', thread=thread.pk, slug=thread.slug) }}
 {%- elif action in 'new_reply' -%}
 {%- if quote -%}
-{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug, quote=quote.pk %}
+{{ url('private_thread_reply', thread=thread.pk, slug=thread.slug, quote=quote.pk) }}
 {%- else -%}
-{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug %}
+{{ url('private_thread_reply', thread=thread.pk, slug=thread.slug) }}
 {%- endif -%}
 {%- elif action == 'edit_reply' -%}
-{% url 'private_post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}
+{{ url('private_post_edit', thread=thread.pk, slug=thread.slug, post=post.pk) }}
 {%- endif %}
 {%- endmacro %}
 
@@ -140,8 +140,8 @@
 {% macro get_info() -%}
 {% if action == 'edit_reply' -%}
     {% if post.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
-    <li><i class="icon-time"></i> <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-    <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+    <li><i class="icon-time"></i> <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+    <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
     <li><i class="icon-pencil"></i> {% if post.edits > 0 -%}
       {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}
     {%- else -%}
@@ -150,11 +150,11 @@
 {%- else -%}
     {% if thread.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
     {% if action == 'edit_thread' %}
-    <li><i class="icon-time"></i> <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=thread.start_post_id %}">{{ thread.start|reltimesince }}</a></li>
+    <li><i class="icon-time"></i> <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=thread.start_post_id) }}">{{ thread.start|reltimesince }}</a></li>
     {% else %}
-    <li><i class="icon-time"></i> <a href="{% url 'private_thread_new' thread=thread.pk, slug=thread.slug %}">{{ thread.last|reltimesince }}</a></li>
+    <li><i class="icon-time"></i> <a href="{{ url('private_thread_new', thread=thread.pk, slug=thread.slug) }}">{{ thread.last|reltimesince }}</a></li>
     {% endif %}
-    <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
+    <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
     <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
       {% trans count=thread.replies, replies=thread.replies|intcomma %}One reply{% pluralize %}{{ replies }} replies{% endtrans %}
     {%- else -%}

+ 54 - 54
templates/cranefly/private_threads/thread.html

@@ -6,7 +6,7 @@
 {% block title %}{{ macros.page_title(title=thread.name,parent=_("Private Threads"),page=pagination['page']) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'private_threads' %}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('private_threads') }}">{% trans %}Private Threads{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{{ thread.name }}
 {%- endblock %}
 
@@ -21,7 +21,7 @@
     <ul class="unstyled header-stats">
       {% if thread.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
       <li><i class="icon-time"></i> {{ thread.last|reltimesince }}</li>
-      <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
+      <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
       <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
         {% trans count=thread.replies, replies=thread.replies|intcomma %}One reply{% pluralize %}{{ replies }} replies{% endtrans %}
       {%- else -%}
@@ -29,7 +29,7 @@
       {%- endif %}</li>
       {% if thread.closed %}<li><i class="icon-lock"></i> {% trans %}Locked{% endtrans %}</li>{% endif %}
       <li class="stats-form">
-        <form class="leave-form" action="{% url 'private_thread_remove_user' thread=thread.pk, slug=thread.slug %}" method="post">
+        <form class="leave-form" action="{{ url('private_thread_remove_user', thread=thread.pk, slug=thread.slug) }}" method="post">
           <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
           <input type="hidden" name="user" value="{{ user.pk }}">
           <button type="submit" class="btn"><i class="icon-remove"></i> {% trans %}Leave Thread{% endtrans %}</button>
@@ -52,21 +52,21 @@
       <div class="thread-buttons">
         {{ pager() }} 
         {% if acl.threads.can_reply(forum, thread) and (acl.private_threads.is_mod() or participants|length > 1) %}
-        <a href="{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
+        <a href="{{ url('private_thread_reply', thread=thread.pk, slug=thread.slug) }}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
         {% endif %}
         {% if watcher %}
-        <form action="{% url 'private_thread_unwatch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
+        <form action="{{ url('private_thread_unwatch', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
         {% if watcher.email %}
-        <form action="{% url 'private_thread_unwatch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form>
+        <form action="{{ url('private_thread_unwatch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form>
         {% else %}
-        <form action="{% url 'private_thread_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
+        <form action="{{ url('private_thread_watch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
         {% endif %}
         {% else %}
-        <form action="{% url 'private_thread_watch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
-        <form action="{% url 'private_thread_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
+        <form action="{{ url('private_thread_watch', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
+        <form action="{{ url('private_thread_watch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
         {% endif %}
         {% if ignored_posts %}
-        <form action="{% url 'private_thread_show_hidden' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn"><i class="icon-eye-open"></i> {% trans %}Show Hidden Replies{% endtrans %}</button></form>
+        <form action="{{ url('private_thread_show_hidden', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn"><i class="icon-eye-open"></i> {% trans %}Show Hidden Replies{% endtrans %}</button></form>
         {% endif %}
       </div>
 
@@ -81,7 +81,7 @@
           {% if post.deleted and not acl.threads.can_see_deleted_posts(forum) %}
           <div class="post-body post-muted">
             {% if post.user_id %}
-            <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(50) }}" alt="" class="user-avatar"></a>
+            <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}"><img src="{{ post.user.get_avatar(50) }}" alt="" class="user-avatar"></a>
             {% else %}
             <img src="{{ macros.avatar_guest(60) }}" alt="" class="user-avatar">
             {% endif %}
@@ -89,23 +89,23 @@
               <div class="post-header">
                 <div class="post-header-compact">
                   {% if post.user_id %}
-                  <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
+                  <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
                   {% else %}
                   <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
                   {% endif %}
                   <span class="separator">&ndash;</span>
-                  <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
+                  <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-date">{{ post.date|reltimesince }}</a>
                   {% if post.edits %}
                   <span class="separator">&ndash;</span>
                   {% if acl.threads.can_see_changelog(user, forum, post) %}
-                  <a href="{% url 'private_thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
+                  <a href="{{ url('private_thread_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
                   {% else %}
                   <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
                   {% endif %}
                   {% endif %}
                 </div>
 
-                <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
+                <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
 
                 {% if not post.is_read %}
                 <div class="post-extra">
@@ -128,10 +128,10 @@
             <div class="post-content">
               <div class="post-header">
                 <div class="post-header-compact">
-                  <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
+                  <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-date">{{ post.date|reltimesince }}</a>
                 </div>
 
-                <a href="{% url 'private_thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
+                <a href="{{ url('private_thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
 
                 {% if not post.is_read %}
                 <div class="post-extra">
@@ -150,7 +150,7 @@
           {% else %}
           <div class="post-body">
             {% if post.user_id %}
-            <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(100) }}" alt="" class="user-avatar"></a>
+            <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}"><img src="{{ post.user.get_avatar(100) }}" alt="" class="user-avatar"></a>
             {% else %}
             <img src="{{ macros.avatar_guest(100) }}" alt="" class="user-avatar">
             {% endif %}
@@ -158,20 +158,20 @@
             <div class="post-content">
               <div class="post-header">
                 {% if post.user_id %}
-                <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
+                <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
                 {% else %}
                 <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
                 {% endif %}
                 <span class="separator">&ndash;</span>
                 <a href="{% if pagination['page'] > 1 -%}
-                {% url 'private_thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
+                {{ url('private_thread', thread=thread.pk, slug=thread.slug, page=pagination['page']) }}
                 {%- else -%}
-                {% url 'private_thread' thread=thread.pk, slug=thread.slug %}
+                {{ url('private_thread', thread=thread.pk, slug=thread.slug) }}
                 {%- endif %}#post-{{ post.pk }}" class="post-date">{{ post.date|reltimesince }}</a>
                 {% if post.edits %}
                 <span class="separator">&ndash;</span>
                 {% if acl.threads.can_see_changelog(user, forum, post) %}
-                <a href="{% url 'private_thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
+                <a href="{{ url('private_thread_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
                 {% else %}
                 <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
                 {% endif %}
@@ -182,9 +182,9 @@
                 {% endif %}
 
                 <a href="{% if pagination['page'] > 1 -%}
-                {% url 'private_thread' thread=thread.pk, slug=thread.slug, page=pagination['page'] %}
+                {{ url('private_thread', thread=thread.pk, slug=thread.slug, page=pagination['page']) }}
                 {%- else -%}
-                {% url 'private_thread' thread=thread.pk, slug=thread.slug %}
+                {{ url('private_thread', thread=thread.pk, slug=thread.slug) }}
                 {%- endif %}#post-{{ post.pk }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
 
                 <div class="post-extra">
@@ -236,43 +236,43 @@
               <div class="post-footer">{% filter trim %}
                 <div class="post-actions">              
                   {% if acl.users.can_see_users_trails() -%}
-                  <a href="{% url 'private_post_info' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-trail">{% trans %}Info{% endtrans %}</a>
+                  <a href="{{ url('private_post_info', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-trail">{% trans %}Info{% endtrans %}</a>
                   {% endif %}
                   {% if post.reported and acl.reports.can_handle() and acl.threads.can_mod_posts(forum) %}
-                  <a href="{% url 'private_post_report_show' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans %}Show report{% endtrans %}</a>
+                  <a href="{{ url('private_post_report_show', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{% trans %}Show report{% endtrans %}</a>
                   {% endif %}
                   {% if acl.reports.can_report() %}
-                  <form action="{% url 'private_post_report' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline form-report" method="post" autocomplete="off">
+                  <form action="{{ url('private_post_report', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline form-report" method="post" autocomplete="off">
                     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                     <button type="submit" class="btn btn-link btn-report tooltip-top" title="{% trans %}Bring this post to moderator attention.{% endtrans %}">{% trans %}Report{% endtrans %}</button>
                   </form>
                   {% endif %}
                   {% if acl.threads.can_edit_thread(user, forum, thread, post) and thread.start_post_id == post.pk %}
-                  <a href="{% url 'private_thread_edit' thread=thread.pk, slug=thread.slug %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
+                  <a href="{{ url('private_thread_edit', thread=thread.pk, slug=thread.slug) }}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
                   {% elif acl.threads.can_edit_reply(user, forum, thread, post) %}
-                  <a href="{% url 'private_post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
+                  <a href="{{ url('private_post_edit', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
                   {%- endif %}
                   {% if acl.threads.can_reply(forum, thread) and (acl.private_threads.is_mod() or participants|length > 1) %}
-                  <a href="{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug, quote=post.pk %}" class="post-reply">{% trans %}Reply{% endtrans %}</a>
+                  <a href="{{ url('private_thread_reply', thread=thread.pk, slug=thread.slug, quote=post.pk) }}" class="post-reply">{% trans %}Reply{% endtrans %}</a>
                   {% endif %}
                 </div>
                 {% if post.pk == thread.start_post_id %}
                 <div class="post-actions">
                   {% if acl.threads.can_delete_thread(user, forum, thread, post) %}
                   {% if post.deleted %}
-                  <form action="{% url 'private_thread_show' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
+                  <form action="{{ url('private_thread_show', thread=thread.pk, slug=thread.slug) }}" class="form-inline" method="post">
                     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                     <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Make this thread visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
                   </form>
                   {% else %}
-                  <form action="{% url 'private_thread_hide' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
+                  <form action="{{ url('private_thread_hide', thread=thread.pk, slug=thread.slug) }}" class="form-inline" method="post">
                     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                     <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Hide this thread from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
                   </form>
                   {% endif %}
                   {% endif %}
                   {% if acl.threads.can_delete_thread(user, forum, thread, post) == 2 %}
-                  <form action="{% url 'private_thread_delete' thread=thread.pk, slug=thread.slug %}" class="form-inline prompt-delete-thread" method="post">
+                  <form action="{{ url('private_thread_delete', thread=thread.pk, slug=thread.slug) }}" class="form-inline prompt-delete-thread" method="post">
                     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                     <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this thread for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
                   </form>
@@ -282,19 +282,19 @@
                 <div class="post-actions">
                   {% if acl.threads.can_delete_post(user, forum, thread, post) %}
                   {% if post.deleted %}
-                  <form action="{% url 'private_post_show' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
+                  <form action="{{ url('private_post_show', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline" method="post">
                     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                     <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Make this reply visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
                   </form>
                   {% else %}
-                  <form action="{% url 'private_post_hide' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
+                  <form action="{{ url('private_post_hide', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline" method="post">
                     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                     <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Hide this reply from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
                   </form>
                   {% endif %}
                   {% endif %}
                   {% if acl.threads.can_delete_post(user, forum, thread, post) == 2 -%}
-                  <form action="{% url 'private_post_delete' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline prompt-delete-post" method="post">
+                  <form action="{{ url('private_post_delete', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline prompt-delete-post" method="post">
                     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                     <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this reply for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
                   </form>
@@ -335,13 +335,13 @@
               {% if user.is_authenticated() %}
               {% if acl.threads.can_delete_checkpoint(forum) %}
               {% if checkpoint.deleted %}
-              <form action="{% url 'private_post_checkpoint_show' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
+              <form action="{{ url('private_post_checkpoint_show', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
                 <button type="submit" class="btn btn-link btn-show">{% trans %}Restore{% endtrans %}</button>
               </form>
               {% else %}
-              <form action="{% url 'private_post_checkpoint_hide' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
+              <form action="{{ url('private_post_checkpoint_hide', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
                 <button type="submit" class="btn btn-link btn-hide">{% trans %}Hide{% endtrans %}</button>
@@ -349,7 +349,7 @@
               {% endif %}
               {% endif %}
               {% if acl.threads.can_delete_checkpoint(forum) == 2 %}
-              <form action="{% url 'private_post_checkpoint_delete' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline prompt-delete-checkpoint">
+              <form action="{{ url('private_post_checkpoint_delete', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline prompt-delete-checkpoint">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
                 <button type="submit" class="btn btn-link btn-delete">{% trans %}Delete{% endtrans %}</button>
@@ -388,7 +388,7 @@
       <div class="thread-buttons">
         {{ pager(false) }}
         {% if acl.threads.can_reply(forum, thread) and (acl.private_threads.is_mod() or participants|length > 1) %}
-        <a href="{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
+        <a href="{{ url('private_thread_reply', thread=thread.pk, slug=thread.slug) }}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
         {% else %}
         <p class="lead thread-signin-message">{% trans %}This thread has too few participants.{% endtrans %}</p>
         {% endif %}
@@ -396,7 +396,7 @@
 
       {% if acl.threads.can_reply(forum, thread) and (acl.private_threads.is_mod() or participants|length > 1) %}
       <div class="thread-quick-reply">
-        <form action="{% url 'private_thread_reply' thread=thread.pk, slug=thread.slug %}" method="post">
+        <form action="{{ url('private_thread_reply', thread=thread.pk, slug=thread.slug) }}" method="post">
           <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
           <input type="hidden" name="quick_reply" value="1">
           <img src="{{ user.get_avatar(100) }}" alt="{% trans %}Your Avatar{% endtrans %}" class="user-avatar">
@@ -416,9 +416,9 @@
         <ul class="unstyled">{% for participant in participants %}
           <li>
             <img src="{{ participant.get_avatar(24) }}" alt="" class="avatar-small">
-            <a href="{% url 'user' username=participant.username_slug, user=participant.pk %}">{{ participant.username }}</a>
+            <a href="{{ url('user', username=participant.username_slug, user=participant.pk) }}">{{ participant.username }}</a>
             {% if user.pk == thread.start_poster_id or acl.private_threads.is_mod() %}
-            <form class="form-inline {% if user.pk == participant.pk %}leave-form{% else %}kick-form{% endif %} tooltip-left" action="{% url 'private_thread_remove_user' thread=thread.pk, slug=thread.slug %}" method="post" title="{% if participant.pk == user.pk %}{% trans %}Leave this thread{% endtrans %}{% else %}{% trans %}Remove from this thread{% endtrans %}{% endif %}">
+            <form class="form-inline {% if user.pk == participant.pk %}leave-form{% else %}kick-form{% endif %} tooltip-left" action="{{ url('private_thread_remove_user', thread=thread.pk, slug=thread.slug) }}" method="post" title="{% if participant.pk == user.pk %}{% trans %}Leave this thread{% endtrans %}{% else %}{% trans %}Remove from this thread{% endtrans %}{% endif %}">
               <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
               <input type="hidden" name="retreat" value="{{ request_path }}">
               <input type="hidden" name="user" value="{{ participant.pk }}">
@@ -435,7 +435,7 @@
 
         <h4>{% trans %}Invite User{% endtrans %}</h4>
         <div class="invite-participant">
-          <form class="form-inline" action="{% url 'private_thread_invite_user' thread=thread.pk, slug=thread.slug %}" method="post">
+          <form class="form-inline" action="{{ url('private_thread_invite_user', thread=thread.pk, slug=thread.slug) }}" method="post">
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}">
             {{ form_theme.input_text(invite_form.fields.username, width="2", attrs={'placeholder':lang_user_to_invite()}) }}
@@ -520,7 +520,7 @@
 
 
 {% macro user_label(user) -%}
-<{% if user.rank and user.rank.as_tab %}a href="{% url 'users' slug=user.rank.slug %}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
+<{% if user.rank and user.rank.as_tab %}a href="{{ url('users', slug=user.rank.slug) }}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
 {%- endmacro %}
 
 
@@ -529,15 +529,15 @@
   <ul>
     {% if pagination['total'] > 0 %}
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'private_thread' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'private_thread' slug=thread.slug, thread=thread.id, page=pagination['prev'] %}{% else %}{% url 'private_thread' slug=thread.slug, thread=thread.id %}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'private_thread' slug=thread.slug, thread=thread.id, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Newest Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{% url 'private_thread' slug=thread.slug, thread=thread.id, page=pagination['total'] %}" class="tooltip-top" title="{% trans %}Go to last page{% endtrans %}">{% trans %}Last{% endtrans %} <i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('private_thread', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('private_thread', slug=thread.slug, thread=thread.id, page=pagination['prev']) }}{% else %}{{ url('private_thread', slug=thread.slug, thread=thread.id) }}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('private_thread', slug=thread.slug, thread=thread.id, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Newest Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{{ url('private_thread', slug=thread.slug, thread=thread.id, page=pagination['total']) }}" class="tooltip-top" title="{% trans %}Go to last page{% endtrans %}">{% trans %}Last{% endtrans %} <i class="icon-chevron-right"></i></a></li>{% endif -%}
     {% endif %}
     {% if extra %}
-    {% if not is_read %}<li><a href="{% url 'private_thread_new' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
+    {% if not is_read %}<li><a href="{{ url('private_thread_new', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
     {% endif %}
-    {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{% url 'private_thread_reported' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
+    {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{{ url('private_thread_reported', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
   </ul>
 </div>
 {% endmacro %}
@@ -545,7 +545,7 @@
 
 {% macro checkpoint_user(checkpoint) -%}
 {%- if checkpoint.user_id -%}
-<a href="{{ 'user'|url(user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
+<a href="{{ url('user', user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
 {%- else -%}
 <strong>{{ checkpoint.user_name }}</strong>
 {%- endif -%}
@@ -554,7 +554,7 @@
 
 {% macro checkpoint_target(checkpoint) -%}
 {%- if checkpoint.target_user_id -%}
-<a href="{{ 'user'|url(user=checkpoint.target_user_id, username=checkpoint.target_user_slug) }}">{{ checkpoint.target_user_name }}</a>
+<a href="{{ url('user', user=checkpoint.target_user_id, username=checkpoint.target_user_slug) }}">{{ checkpoint.target_user_name }}</a>
 {%- else -%}
 <strong>{{ checkpoint.target_user_name }}</strong>
 {%- endif -%}
@@ -563,7 +563,7 @@
 
 {% macro edit_user(post) -%}
 {%- if post.edit_user_id -%}
-<a href="{{ 'user'|url(user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
+<a href="{{ url('user', user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
 {%- else -%}
 <strong>{{ post.edit_user_name }}</strong>
 {%- endif -%}

+ 4 - 4
templates/cranefly/profiles/followers.html

@@ -29,8 +29,8 @@
         {% for user in row %}
         <td class="span3 user-cell">
           {% if user %}
-          <a href="{% url 'user' username=user.username_slug, user=user.pk %}" class="user-avatar"><img src="{{ user.get_avatar(36) }}" alt=""></a>
-          <a href="{% url 'user' username=user.username_slug, user=user.pk %}" class="user-name">{{ user.username }}</a>
+          <a href="{{ url('user', username=user.username_slug, user=user.pk) }}" class="user-avatar"><img src="{{ user.get_avatar(36) }}" alt=""></a>
+          <a href="{{ url('user', username=user.username_slug, user=user.pk) }}" class="user-name">{{ user.username }}</a>
           {% else %}
           &nbsp;
           {% endif %}
@@ -50,8 +50,8 @@
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'user_followers' user=profile.id, username=profile.username_slug, page=pagination['prev'] %}{% else %}{% url 'user_followers' user=profile.id, username=profile.username_slug %}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'user_followers' user=profile.id, username=profile.username_slug, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('user_followers', user=profile.id, username=profile.username_slug, page=pagination['prev']) }}{% else %}{{ url('user_followers', user=profile.id, username=profile.username_slug) }}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('user_followers', user=profile.id, username=profile.username_slug, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 4 - 4
templates/cranefly/profiles/follows.html

@@ -29,8 +29,8 @@
         {% for user in row %}
         <td class="span3 user-cell">
           {% if user %}
-          <a href="{% url 'user' username=user.username_slug, user=user.pk %}" class="user-avatar"><img src="{{ user.get_avatar(36) }}" alt=""></a>
-          <a href="{% url 'user' username=user.username_slug, user=user.pk %}" class="user-name">{{ user.username }}</a>
+          <a href="{{ url('user', username=user.username_slug, user=user.pk) }}" class="user-avatar"><img src="{{ user.get_avatar(36) }}" alt=""></a>
+          <a href="{{ url('user', username=user.username_slug, user=user.pk) }}" class="user-name">{{ user.username }}</a>
           {% else %}
           &nbsp;
           {% endif %}
@@ -50,8 +50,8 @@
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'user_follows' user=profile.id, username=profile.username_slug, page=pagination['prev'] %}{% else %}{% url 'user_follows' user=profile.id, username=profile.username_slug %}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'user_follows' user=profile.id, username=profile.username_slug, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('user_follows', user=profile.id, username=profile.username_slug, page=pagination['prev']) }}{% else %}{{ url('user_follows', user=profile.id, username=profile.username_slug) }}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('user_follows', user=profile.id, username=profile.username_slug, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 8 - 8
templates/cranefly/profiles/list.html

@@ -17,11 +17,11 @@
     <h1>{% trans %}Users List{% endtrans %} <small>{% trans %}Browse notable user groups or find specific user{% endtrans %}</small></h1>
     <ul class="nav nav-tabs header-tabs">
       {% for rank in ranks %}
-      <li{% if active_rank.id == rank.id %} class="active"{% endif %}><a href="{% if loop.first %}{% url 'users' %}{% else %}{% url 'users' slug=rank.slug %}{% endif %}">{{ _(rank.name) }}</a></li>
+      <li{% if active_rank.id == rank.id %} class="active"{% endif %}><a href="{% if loop.first %}{{ url('users') }}{% else %}{{ url('users', slug=rank.slug) }}{% endif %}">{{ _(rank.name) }}</a></li>
       {% endfor %}
       {% if acl.users.can_search_users() and not user.is_crawler() %}
       <li class="pull-right">
-        <form action="{% url 'users' %}" class="form-inline" method="post">
+        <form action="{{ url('users') }}" class="form-inline" method="post">
           <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
           {{ form_theme.field_widget(search_form.username, width=2, attrs={'placeholder': lang_find_user()}) }}
           <button type="submit" class="btn btn-icon"><i class="icon-search"></i></button>
@@ -62,8 +62,8 @@
           {% for user in row %}
           <td class="span3 user-cell{% if user and user.get_style() %} user-cell-{{ user.get_style() }}{% endif %}">
             {% if user %}
-            <a href="{% url 'user' username=user.username_slug, user=user.pk %}" class="user-avatar"><img src="{{ user.get_avatar(36) }}" alt=""></a>
-            <a href="{% url 'user' username=user.username_slug, user=user.pk %}" class="user-name">{{ user.username }}</a>
+            <a href="{{ url('user', username=user.username_slug, user=user.pk) }}" class="user-avatar"><img src="{{ user.get_avatar(36) }}" alt=""></a>
+            <a href="{{ url('user', username=user.username_slug, user=user.pk) }}" class="user-name">{{ user.username }}</a>
             {% else %}
             &nbsp;
             {% endif %}
@@ -94,16 +94,16 @@
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'users' page=pagination['prev'] %}{% else %}{% url 'users' %}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'users' page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('users', page=pagination['prev']) }}{% else %}{{ url('users') }}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('users', page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% else %}
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'users' slug=active_rank.slug, page=pagination['prev'] %}{% else %}{% url 'users' slug=active_rank.slug %}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'users' slug=active_rank.slug, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('users', slug=active_rank.slug, page=pagination['prev']) }}{% else %}{{ url('users', slug=active_rank.slug) }}{% endif %}" class="tooltip-top" title="{% trans %}Previous Page{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('users', slug=active_rank.slug, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Next Page{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 7 - 7
templates/cranefly/profiles/posts.html

@@ -19,11 +19,11 @@
 <div class="content-list user-posts">
   {% for item in items %}
   <div class="media">
-    <a href="{% url 'user' user=profile.pk, username=profile.username_slug %}" class="pull-left">
+    <a href="{{ url('user', user=profile.pk, username=profile.username_slug) }}" class="pull-left">
       <img class="media-object" src="{{ profile.get_avatar(52) }}">
     </a>
     <div class="media-body">
-      <a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}" class="post-preview">{{ item.post_preparsed|markdown_short(300) }}</a>
+      <a href="{{ url('thread_find', thread=item.thread.pk, slug=item.thread.slug, post=item.pk) }}" class="post-preview">{{ item.post_preparsed|markdown_short(300) }}</a>
       <div class="media-footer">{% if item.thread.start_post_id == item.pk -%}
       {% trans thread=thread(item), forum=forum(item.forum), date=item.date|reltimesince|low %}Thread {{ thread }} posted in {{ forum }} {{ date }}{% endtrans %}
       {%- else -%}
@@ -43,18 +43,18 @@
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'user_posts' user=profile.id, username=profile.username_slug %}" class="tooltip-top" title="{% trans %}Lastest Posts{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'user_posts' user=profile.id, username=profile.username_slug, page=pagination['prev'] %}{% else %}{% url 'user_posts' user=profile.id, username=profile.username_slug %}{% endif %}" class="tooltip-top" title="{% trans %}Newer Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'user_posts' user=profile.id, username=profile.username_slug, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('user_posts', user=profile.id, username=profile.username_slug) }}" class="tooltip-top" title="{% trans %}Lastest Posts{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('user_posts', user=profile.id, username=profile.username_slug, page=pagination['prev']) }}{% else %}{{ url('user_posts', user=profile.id, username=profile.username_slug) }}{% endif %}" class="tooltip-top" title="{% trans %}Newer Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('user_posts', user=profile.id, username=profile.username_slug, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}
 {%- endmacro %}
 
 {% macro thread(item) -%}
-<a href="{% url 'thread_find' thread=item.thread.pk, slug=item.thread.slug, post=item.pk %}">{{ item.thread.name }}</a>
+<a href="{{ url('thread_find', thread=item.thread.pk, slug=item.thread.slug, post=item.pk) }}">{{ item.thread.name }}</a>
 {%- endmacro %}
 
 {% macro forum(forum) -%}
-<a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}">{{ forum.name }}</a>
+<a href="{{ url('forum', forum=forum.pk, slug=forum.slug) }}">{{ forum.name }}</a>
 {%- endmacro %}

+ 5 - 5
templates/cranefly/profiles/profile.html

@@ -10,7 +10,7 @@
       {{ messages_list(messages) }}
       <div class="header-row">
         {% if profile.id == user.id and not user.avatar_ban %}
-        <a href="{% url 'usercp_avatar' %}"><img src="{{ profile.get_avatar() }}" class="header-avatar tooltip-right" title="{% trans %}Click to jump to your Avatar Settings{% endtrans %}"></a>
+        <a href="{{ url('usercp_avatar') }}"><img src="{{ profile.get_avatar() }}" class="header-avatar tooltip-right" title="{% trans %}Click to jump to your Avatar Settings{% endtrans %}"></a>
         {% else %}
         <img src="{{ profile.get_avatar() }}" class="header-avatar">
         {% endif %}
@@ -39,12 +39,12 @@
           <ul class="nav nav-tabs header-tabs">
             {% for link in tabs %}
             <li{% if link.active %} class="active"{% endif %}>
-              <a href="{{ link.route|url(user=profile.pk, username=profile.username_slug) }}">{{ link.name }}</a>
+              <a href="{{ url(link.route, user=profile.pk, username=profile.username_slug) }}">{{ link.name }}</a>
             </li>
             {% endfor %}
             {% if user.is_authenticated() and user.pk != profile.pk %}
             <li class="pull-right">
-              <form class="form-inline" action="{% if ignores %}{% url 'unignore_user' user=profile.id %}{% else %}{% url 'ignore_user' user=profile.id %}{% endif %}" method="post">
+              <form class="form-inline" action="{% if ignores %}{{ url('unignore_user', user=profile.id) }}{% else %}{{ url('ignore_user', user=profile.id) }}{% endif %}" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <input type="hidden" name="fallback" value="{{ fallback }}">
                 <button type="submit" class="btn tooltip-top{% if ignores %} btn-inverse{% endif %}" title="{% if ignores %}{% trans user=profile.username %}Remove {{ user }} from ignored{% endtrans %}{% else %}{% trans user=profile.username %}Add {{ user }} to ignored{% endtrans %}{% endif %}">
@@ -53,7 +53,7 @@
               </form>
             </li>
             <li class="pull-right">
-              <form class="form-inline" action="{% if follows %}{% url 'unfollow_user' user=profile.id %}{% else %}{% url 'follow_user' user=profile.id %}{% endif %}" method="post">
+              <form class="form-inline" action="{% if follows %}{{ url('unfollow_user', user=profile.id) }}{% else %}{{ url('follow_user', user=profile.id) }}{% endif %}" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <input type="hidden" name="fallback" value="{{ fallback }}">
                 <button type="submit" class="btn tooltip-top{% if follows %} btn-success{% endif %}" title="{% if follows %}{% trans user=profile.username %}Stop following {{ user }}{% endtrans %}{% else %}{% trans user=profile.username %}Start following {{ user }}{% endtrans %}{% endif %}">
@@ -63,7 +63,7 @@
             </li>
             {% if acl.private_threads.can_start() %}
             <li class="pull-right">
-              <a href="{% url 'private_thread_start_with' username=profile.username_slug, user=profile.pk %}" class="btn tooltip-top" title="{% trans user=profile.username %}Start private thread with {{ user }}{% endtrans %}"><i class="icon-envelope"></i></a>
+              <a href="{{ url('private_thread_start_with', username=profile.username_slug, user=profile.pk) }}" class="btn tooltip-top" title="{% trans user=profile.username %}Start private thread with {{ user }}{% endtrans %}"><i class="icon-envelope"></i></a>
             </li>
             {% endif %}
             {% endif %}

+ 7 - 7
templates/cranefly/profiles/threads.html

@@ -19,11 +19,11 @@
 <div class="content-list user-threads">
   {% for item in items %}
   <div class="media">
-    <a href="{% url 'user' user=profile.pk, username=profile.username_slug %}" class="pull-left">
+    <a href="{{ url('user', user=profile.pk, username=profile.username_slug) }}" class="pull-left">
       <img class="media-object" src="{{ profile.get_avatar(52) }}">
     </a>
     <div class="media-body">
-      <a href="{% url 'thread' thread=item.pk, slug=item.slug %}" class="post-preview">{{ item.start_post.post_preparsed|markdown_short(300) }}</a>
+      <a href="{{ url('thread', thread=item.pk, slug=item.slug) }}" class="post-preview">{{ item.start_post.post_preparsed|markdown_short(300) }}</a>
       <div class="media-footer">{% trans thread=thread(item), forum=forum(item.forum), date=item.start|reltimesince|low %}Thread {{ thread }} posted in {{ forum }} {{ date }}{% endtrans %}</div>
     </div>
   </div>
@@ -39,18 +39,18 @@
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'user_threads' user=profile.id, username=profile.username_slug %}" class="tooltip-top" title="{% trans %}Lastest Posts{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'user_threads' user=profile.id, username=profile.username_slug, page=pagination['prev'] %}{% else %}{% url 'user_threads' user=profile.id, username=profile.username_slug %}{% endif %}" class="tooltip-top" title="{% trans %}Newer Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'user_threads' user=profile.id, username=profile.username_slug, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('user_threads', user=profile.id, username=profile.username_slug) }}" class="tooltip-top" title="{% trans %}Lastest Posts{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('user_threads', user=profile.id, username=profile.username_slug, page=pagination['prev']) }}{% else %}{{ url('user_threads', user=profile.id, username=profile.username_slug) }}{% endif %}" class="tooltip-top" title="{% trans %}Newer Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('user_threads', user=profile.id, username=profile.username_slug, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}
 {%- endmacro %}
 
 {% macro thread(item) -%}
-<a href="{% url 'thread' thread=item.pk, slug=item.slug %}">{{ item.name }}</a>
+<a href="{{ url('thread', thread=item.pk, slug=item.slug) }}">{{ item.name }}</a>
 {%- endmacro %}
 
 {% macro forum(forum) -%}
-<a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}">{{ forum.name }}</a>
+<a href="{{ url('forum', forum=forum.pk, slug=forum.slug) }}">{{ forum.name }}</a>
 {%- endmacro %}

+ 1 - 1
templates/cranefly/register.html

@@ -19,7 +19,7 @@
       </div>
       {% endif %}
 
-      <form action="{% url 'register' %}" method="post">
+      <form action="{{ url('register') }}" method="post">
         <div class="form-fields">
           {{ form_theme.form_widget(form, width=8) }}
         </div>

+ 8 - 8
templates/cranefly/reports/changelog.html

@@ -4,8 +4,8 @@
 {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Changelog") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'reports' %}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'report' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('reports') }}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('report', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}
 {%- endblock %}
 
@@ -18,8 +18,8 @@
     </ul>
     <h1>{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %} <small>{{ thread.name }}</small></h1>
     <ul class="unstyled header-stats">
-      <li><i class="icon-time"></i> <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
       <li><i class="icon-pencil"></i> {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</li>
       {% if post.protected %}<li><i class="icon-lock"></i> {% trans %}Protected{% endtrans %}</li>{% endif %}
     </ul>
@@ -45,13 +45,13 @@
             </span>
           </td>
           <td>
-            <a href="{% url 'report_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}" class="change-no">#{{ loop.revindex }}</a>
+            <a href="{{ url('report_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}" class="change-no">#{{ loop.revindex }}</a>
             {% if edit.reason %}
             <div class="change-reason">
-              <a href="{% url 'report_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}">{{ edit.reason }}</a>
+              <a href="{{ url('report_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}">{{ edit.reason }}</a>
             </div>{% endif %}
             <div class="change-description">
-              <a href="{% url 'report_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}">
+              <a href="{{ url('report_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}">
               {% if edit.change != 0 %}{% if edit.change > 0 -%}
               {% trans chars=edit.change %}Added one character to post.{% pluralize %}Added {{ chars }} characters to post.{% endtrans %}
               {%- elif edit.change < 0 -%}
@@ -77,5 +77,5 @@
 
 
 {% macro edit_user(edit) -%}
-{% if edit.user_id %}<a href="{% url 'user' user=edit.user_id, username=edit.user_slug %}">{{ edit.user_name }}</a>{% else %}{{ edit.user_name }}{% endif %}
+{% if edit.user_id %}<a href="{{ url('user', user=edit.user_id, username=edit.user_slug) }}">{{ edit.user_name }}</a>{% else %}{{ edit.user_name }}{% endif %}
 {%- endmacro %}

+ 8 - 8
templates/cranefly/reports/changelog_diff.html

@@ -4,9 +4,9 @@
 {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Changelog") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'reports' %}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'report' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'report_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('reports') }}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('report', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('report_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %}
 {%- endblock %}
 
@@ -19,8 +19,8 @@
     </ul>
     <h1>{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %} <small>{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</small></h1>
     <ul class="unstyled header-stats pull-left">
-      <li><i class="icon-time"></i> <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if change.user_id %}<a href="{% url 'user' user=change.user_id, username=change.user_slug %}">{{ change.user_name }}</a>{% else %}{{ change.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if change.user_id %}<a href="{{ url('user', user=change.user_id, username=change.user_slug) }}">{{ change.user_name }}</a>{% else %}{{ change.user_name }}{% endif %}</li>
       {% if acl.users.can_see_users_trails() %}
       <li><i class="icon-globe"></i> {{ change.ip }}</li>
       <li><i class="icon-qrcode"></i> {{ change.agent }}</li>
@@ -50,7 +50,7 @@
     <div class="diff-extra">
       {{ pager() }}
       {% if user.is_authenticated() and acl.threads.can_make_revert(forum, thread) %}
-      <form class="form-inline pull-right" action="{% url 'report_changelog_revert' thread=thread.pk, slug=thread.slug, post=post.pk, change=change.pk %}" method="post">
+      <form class="form-inline pull-right" action="{{ url('report_changelog_revert', thread=thread.pk, slug=thread.slug, post=post.pk, change=change.pk) }}" method="post">
         <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
         <button type="submit" class="btn btn-danger">{% trans %}Revert this edit{% endtrans %}</button></li>
       </form>
@@ -87,8 +87,8 @@
 {% if prev or prev %}
 <div class="pagination pull-left">
   <ul>
-    {% if prev %}<li><a href="{% url 'report_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=prev.pk %}"><i class="icon-chevron-left"></i> {{ prev.date|reldate }}</a></li>{% endif %}
-    {% if next %}<li><a href="{% url 'report_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=next.pk %}">{{ next.date|reldate }} <i class="icon-chevron-right"></i></a></li>{% endif %}
+    {% if prev %}<li><a href="{{ url('report_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=prev.pk) }}"><i class="icon-chevron-left"></i> {{ prev.date|reldate }}</a></li>{% endif %}
+    {% if next %}<li><a href="{{ url('report_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=next.pk) }}">{{ next.date|reldate }} <i class="icon-chevron-right"></i></a></li>{% endif %}
   </ul>
 </div>
 {% endif %}

+ 4 - 4
templates/cranefly/reports/details.html

@@ -4,8 +4,8 @@
 {% block title %}{{ macros.page_title(title=(_("Post #%(post)s Info") % {'post': post.pk}),parent=thread.name) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'reports' %}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'report' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('reports') }}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('report', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans post=post.pk %}Post #{{ post }} Info{% endtrans %}
 {%- endblock %}
 
@@ -18,8 +18,8 @@
     </ul>
     <h1>{% trans post=post.pk %}Post #{{ post }} Info{% endtrans %} <small>{{ thread.name }}</small></h1>
     <ul class="unstyled header-stats">
-      <li><i class="icon-time"></i> <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
       <li><i class="icon-pencil"></i> {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</li>
       {% if post.protected %}<li><i class="icon-lock"></i> {% trans %}Protected{% endtrans %}</li>{% endif %}
     </ul>

+ 8 - 8
templates/cranefly/reports/list.html

@@ -65,12 +65,12 @@
           </ul>
           {% endif %}
           
-          <a href="{% url 'report' thread=thread.pk, slug=thread.slug %}" class="thread-name"><span class="report-id">#{{ thread.pk }}</span> {{ thread.name }}</a>
+          <a href="{{ url('report', thread=thread.pk, slug=thread.slug) }}" class="thread-name"><span class="report-id">#{{ thread.pk }}</span> {{ thread.name }}</a>
           
           {% if thread.is_read %}
-          <a href="{% url 'report_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last comment{% endtrans %}"><i class="icon-asterisk"></i></a>
+          <a href="{{ url('report_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last comment{% endtrans %}"><i class="icon-asterisk"></i></a>
           {% else %}
-          <a href="{% url 'report_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread comment{% endtrans %}"><i class="icon-fire"></i></a>
+          <a href="{{ url('report_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread comment{% endtrans %}"><i class="icon-fire"></i></a>
           {% endif %}
 
           <div class="thread-details">
@@ -128,11 +128,11 @@
 {%- endmacro %}
 
 {% macro thread_starter(thread) -%}
-{% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
+{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro thread_reply(thread) -%}
-{% if thread.last_poster_id %}<a href="{% url 'user' user=thread.last_poster_id, username=thread.last_poster_slug %}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
+{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro report_forum(thread) -%}
@@ -144,9 +144,9 @@
 <div class="pagination pull-left">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'forum' slug=forum.slug, forum=forum.id %}" class="tooltip-top" title="{% trans %}First Page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'forum' slug=forum.slug, forum=forum.id, page=pagination['prev'] %}{% else %}{% url 'forum' slug=forum.slug, forum=forum.id %}{% endif %}" class="tooltip-top" title="{% trans %}Newest Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'forum' slug=forum.slug, forum=forum.id, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('forum', slug=forum.slug, forum=forum.id) }}" class="tooltip-top" title="{% trans %}First Page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('forum', slug=forum.slug, forum=forum.id, page=pagination['prev']) }}{% else %}{{ url('forum', slug=forum.slug, forum=forum.id) }}{% endif %}" class="tooltip-top" title="{% trans %}Newest Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('forum', slug=forum.slug, forum=forum.id, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 12 - 12
templates/cranefly/reports/posting.html

@@ -6,8 +6,8 @@
 {% block title %}{{ macros.page_title(title=_(get_title()), parent=thread.name) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'reports' %}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'report' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('reports') }}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('report', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{{ get_title() }}
 {%- endblock %}
 
@@ -111,17 +111,17 @@
 
 {% macro get_action() -%}
 {% if action == 'new_thread' -%}
-{% url 'report_start' forum=forum.pk, slug=forum.slug %}
+{{ url('report_start', forum=forum.pk, slug=forum.slug) }}
 {%- elif action == 'edit_thread' -%}
-{% url 'report_edit' thread=thread.pk, slug=thread.slug %}
+{{ url('report_edit', thread=thread.pk, slug=thread.slug) }}
 {%- elif action in 'new_reply' -%}
 {%- if quote -%}
-{% url 'report_reply' thread=thread.pk, slug=thread.slug, quote=quote.pk %}
+{{ url('report_reply', thread=thread.pk, slug=thread.slug, quote=quote.pk) }}
 {%- else -%}
-{% url 'report_reply' thread=thread.pk, slug=thread.slug %}
+{{ url('report_reply', thread=thread.pk, slug=thread.slug) }}
 {%- endif -%}
 {%- elif action == 'edit_reply' -%}
-{% url 'post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}
+{{ url('post_edit', thread=thread.pk, slug=thread.slug, post=post.pk) }}
 {%- endif %}
 {%- endmacro %}
 
@@ -139,8 +139,8 @@
 
 {% macro get_info() -%}
 {% if action == 'edit_reply' -%}
-    <li><i class="icon-time"></i> <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-    <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+    <li><i class="icon-time"></i> <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+    <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
     <li><i class="icon-pencil"></i> {% if post.edits > 0 -%}
       {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}
     {%- else -%}
@@ -148,11 +148,11 @@
     {%- endif %}</li>
 {%- else -%}
     {% if action == 'edit_thread' %}
-    <li><i class="icon-time"></i> <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=thread.start_post_id %}">{{ thread.start|reltimesince }}</a></li>
+    <li><i class="icon-time"></i> <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=thread.start_post_id) }}">{{ thread.start|reltimesince }}</a></li>
     {% else %}
-    <li><i class="icon-time"></i> <a href="{% url 'report_new' thread=thread.pk, slug=thread.slug %}">{{ thread.last|reltimesince }}</a></li>
+    <li><i class="icon-time"></i> <a href="{{ url('report_new', thread=thread.pk, slug=thread.slug) }}">{{ thread.last|reltimesince }}</a></li>
     {% endif %}
-    <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
+    <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
     <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
       {% trans count=thread.replies, replies=thread.replies|intcomma %}One comment{% pluralize %}{{ replies }} comments{% endtrans %}
     {%- else -%}

+ 43 - 43
templates/cranefly/reports/thread.html

@@ -6,7 +6,7 @@
 {% block title %}{{ macros.page_title(title=thread.name,parent=forum.name,page=pagination['page']) }}{% endblock %}
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'reports' %}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('reports') }}">{% trans %}Reported Posts{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{{ thread.name }}
 {%- endblock %}
 
@@ -27,7 +27,7 @@
         Bogus
         {%- endif %}</li>
       <li><i class="icon-time"></i> {{ thread.last|reltimesince }}</li>
-      <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
+      <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
       <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
         {% trans count=thread.replies, replies=thread.replies|intcomma %}One comment{% pluralize %}{{ replies }} comments{% endtrans %}
       {%- else -%}
@@ -46,17 +46,17 @@
 
   <div class="thread-buttons">
     {{ pager() }}
-    <a href="{% url 'report_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Comment{% endtrans %}</a>
+    <a href="{{ url('report_reply', thread=thread.pk, slug=thread.slug) }}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Comment{% endtrans %}</a>
     {% if watcher %}
-    <form action="{% url 'report_unwatch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
+    <form action="{{ url('report_unwatch', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
     {% if watcher.email %}
-    <form action="{% url 'report_unwatch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form>
+    <form action="{{ url('report_unwatch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form>
     {% else %}
-    <form action="{% url 'report_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
+    <form action="{{ url('report_watch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
     {% endif %}
     {% else %}
-    <form action="{% url 'report_watch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
-    <form action="{% url 'report_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
+    <form action="{{ url('report_watch', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
+    <form action="{{ url('report_watch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
     {% endif %}
   </div>
 
@@ -75,7 +75,7 @@
       {% if post.deleted and not acl.threads.can_see_deleted_posts(forum) %}
       <div class="post-body post-muted">
         {% if post.user_id %}
-        <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(50) }}" alt="" class="user-avatar"></a>
+        <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}"><img src="{{ post.user.get_avatar(50) }}" alt="" class="user-avatar"></a>
         {% else %}
         <img src="{{ macros.avatar_guest(60) }}" alt="" class="user-avatar">
         {% endif %}
@@ -83,23 +83,23 @@
           <div class="post-header">
             <div class="post-header-compact">
               {% if post.user_id %}
-              <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
+              <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
               {% else %}
               <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
               {% endif %}
               <span class="separator">&ndash;</span>
-              <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
+              <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-date">{{ post.date|reltimesince }}</a>
               {% if post.edits %}
               <span class="separator">&ndash;</span>
               {% if acl.threads.can_see_changelog(user, forum, post) %}
-              <a href="{% url 'report_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
+              <a href="{{ url('report_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
               {% else %}
               <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
               {% endif %}
               {% endif %}
             </div>
 
-            <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
+            <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
 
             {% if not post.is_read %}
             <div class="post-extra">
@@ -118,7 +118,7 @@
       {% else %}
       <div class="post-body">
         {% if post.user_id %}
-        <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(100) }}" alt="" class="user-avatar"></a>
+        <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}"><img src="{{ post.user.get_avatar(100) }}" alt="" class="user-avatar"></a>
         {% else %}
         <img src="{{ macros.avatar_guest(100) }}" alt="" class="user-avatar">
         {% endif %}
@@ -126,16 +126,16 @@
         <div class="post-content">
           <div class="post-header">
             {% if post.user_id %}
-            <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
+            <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
             {% else %}
             <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
             {% endif %}
             <span class="separator">&ndash;</span>
-            <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
+            <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-date">{{ post.date|reltimesince }}</a>
             {% if post.edits %}
             <span class="separator">&ndash;</span>
             {% if acl.threads.can_see_changelog(user, forum, post) %}
-            <a href="{% url 'report_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
+            <a href="{{ url('report_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
             {% else %}
             <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
             {% endif %}
@@ -146,9 +146,9 @@
             {% endif %}
 
             {% if posts_form and thread.start_post_id == post.pk %}
-            <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#1</i></a>
+            <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#1</i></a>
             {% else %}
-            <a href="{% url 'report_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index0 }}</a>
+            <a href="{{ url('report_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index0 }}</a>
             {% endif %}
 
             <div class="post-extra">
@@ -213,32 +213,32 @@
             {% endif %}
             <div class="post-actions">
               {% if acl.users.can_see_users_trails() -%}
-              <a href="{% url 'report_post_info' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-trail">{% trans %}Info{% endtrans %}</a>
+              <a href="{{ url('report_post_info', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-trail">{% trans %}Info{% endtrans %}</a>
               {% endif %}
               {% if acl.threads.can_edit_thread(user, forum, thread, post) and thread.start_post_id == post.pk %}
-              <a href="{% url 'report_edit' thread=thread.pk, slug=thread.slug %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
+              <a href="{{ url('report_edit', thread=thread.pk, slug=thread.slug) }}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
               {% elif acl.threads.can_edit_reply(user, forum, thread, post) %}
-              <a href="{% url 'report_post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
+              <a href="{{ url('report_post_edit', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
               {%- endif %}
-              <a href="{% url 'report_reply' thread=thread.pk, slug=thread.slug, quote=post.pk %}" class="post-reply">{% trans %}Reply{% endtrans %}</a>
+              <a href="{{ url('report_reply', thread=thread.pk, slug=thread.slug, quote=post.pk) }}" class="post-reply">{% trans %}Reply{% endtrans %}</a>
             </div>
             {% if post.pk == thread.start_post_id %}
             <div class="post-actions">
               {% if acl.threads.can_delete_thread(user, forum, thread, post) %}
               {% if post.deleted %}
-              <form action="{% url 'report_show' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
+              <form action="{{ url('report_show', thread=thread.pk, slug=thread.slug) }}" class="form-inline" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Make this thread visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
               </form>
               {% else %}
-              <form action="{% url 'report_hide' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
+              <form action="{{ url('report_hide', thread=thread.pk, slug=thread.slug) }}" class="form-inline" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Hide this thread from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
               </form>
               {% endif %}
               {% endif %}
               {% if acl.threads.can_delete_thread(user, forum, thread, post) == 2 %}
-              <form action="{% url 'report_delete' thread=thread.pk, slug=thread.slug %}" class="form-inline prompt-delete-thread" method="post">
+              <form action="{{ url('report_delete', thread=thread.pk, slug=thread.slug) }}" class="form-inline prompt-delete-thread" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this thread for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
               </form>
@@ -248,19 +248,19 @@
             <div class="post-actions">
               {% if acl.threads.can_delete_post(user, forum, thread, post) %}
               {% if post.deleted %}
-              <form action="{% url 'report_post_show' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
+              <form action="{{ url('report_post_show', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Make this reply visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
               </form>
               {% else %}
-              <form action="{% url 'report_post_hide' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
+              <form action="{{ url('report_post_hide', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Hide this reply from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
               </form>
               {% endif %}
               {% endif %}
               {% if acl.threads.can_delete_post(user, forum, thread, post) == 2 -%}
-              <form action="{% url 'report_post_delete' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline prompt-delete-post" method="post">
+              <form action="{{ url('report_post_delete', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline prompt-delete-post" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this reply for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
               </form>
@@ -294,13 +294,13 @@
           {%- endif -%}
           {% if acl.threads.can_delete_checkpoint(forum) %}
           {% if checkpoint.deleted %}
-          <form action="{% url 'report_post_checkpoint_show' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
+          <form action="{{ url('report_post_checkpoint_show', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline">
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
             <button type="submit" class="btn btn-link btn-show">{% trans %}Restore{% endtrans %}</button>
           </form>
           {% else %}
-          <form action="{% url 'report_post_checkpoint_hide' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
+          <form action="{{ url('report_post_checkpoint_hide', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline">
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
             <button type="submit" class="btn btn-link btn-hide">{% trans %}Hide{% endtrans %}</button>
@@ -308,7 +308,7 @@
           {% endif %}
           {% endif %}
           {% if acl.threads.can_delete_checkpoint(forum) == 2 %}
-          <form action="{% url 'report_post_checkpoint_delete' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline prompt-delete-checkpoint">
+          <form action="{{ url('report_post_checkpoint_delete', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline prompt-delete-checkpoint">
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
             <button type="submit" class="btn btn-link btn-delete">{% trans %}Delete{% endtrans %}</button>
@@ -343,11 +343,11 @@
 
   <div class="thread-buttons">
     {{ pager(false) }}
-    <a href="{% url 'report_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Comment{% endtrans %}</a>
+    <a href="{{ url('report_reply', thread=thread.pk, slug=thread.slug) }}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Comment{% endtrans %}</a>
   </div>
 
   <div class="thread-quick-reply">
-    <form action="{% url 'report_reply' thread=thread.pk, slug=thread.slug %}" method="post">
+    <form action="{{ url('report_reply', thread=thread.pk, slug=thread.slug) }}" method="post">
       <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
       <input type="hidden" name="quick_reply" value="1">
       <img src="{{ user.get_avatar(100) }}" alt="{% trans %}Your Avatar{% endtrans %}" class="user-avatar">
@@ -406,7 +406,7 @@
 
 
 {% macro user_label(user) -%}
-<{% if user.rank and user.rank.as_tab %}a href="{% url 'users' slug=user.rank.slug %}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
+<{% if user.rank and user.rank.as_tab %}a href="{{ url('users', slug=user.rank.slug) }}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
 {%- endmacro %}
 
 
@@ -415,13 +415,13 @@
   <ul>
     {% if pagination['total'] > 0 %}
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'report' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'report' slug=thread.slug, thread=thread.id, page=pagination['prev'] %}{% else %}{% url 'report' slug=thread.slug, thread=thread.id %}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'report' slug=thread.slug, thread=thread.id, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Newest Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{% url 'report' slug=thread.slug, thread=thread.id, page=pagination['total'] %}" class="tooltip-top" title="{% trans %}Go to last page{% endtrans %}">{% trans %}Last{% endtrans %} <i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('report', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('report', slug=thread.slug, thread=thread.id, page=pagination['prev']) }}{% else %}{{ url('report', slug=thread.slug, thread=thread.id) }}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('report', slug=thread.slug, thread=thread.id, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Newest Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{{ url('report', slug=thread.slug, thread=thread.id, page=pagination['total']) }}" class="tooltip-top" title="{% trans %}Go to last page{% endtrans %}">{% trans %}Last{% endtrans %} <i class="icon-chevron-right"></i></a></li>{% endif -%}
     {% endif %}
     {% if extra %}
-    {% if not is_read %}<li><a href="{% url 'report_new' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
+    {% if not is_read %}<li><a href="{{ url('report_new', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
     {% endif %}
   </ul>
 </div>
@@ -430,7 +430,7 @@
 
 {% macro checkpoint_user(checkpoint) -%}
 {%- if checkpoint.user_id -%}
-<a href="{{ 'user'|url(user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
+<a href="{{ url('user', user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
 {%- else -%}
 <strong>{{ checkpoint.user_name }}</strong>
 {%- endif -%}
@@ -439,7 +439,7 @@
 
 {% macro checkpoint_forum(checkpoint) -%}
 {%- if checkpoint.old_forum_id -%}
-<a href="{% url 'forum' forum=checkpoint.old_forum_id, slug=checkpoint.old_forum_slug %}">{{ checkpoint.old_forum_name }}</a>
+<a href="{{ url('forum', forum=checkpoint.old_forum_id, slug=checkpoint.old_forum_slug) }}">{{ checkpoint.old_forum_name }}</a>
 {%- else -%}
 <strong>{{ checkpoint.old_forum_name }}</strong>
 {%- endif -%}
@@ -448,7 +448,7 @@
 
 {% macro edit_user(post) -%}
 {%- if post.edit_user_id -%}
-<a href="{{ 'user'|url(user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
+<a href="{{ url('user', user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
 {%- else -%}
 <strong>{{ post.edit_user_name }}</strong>
 {%- endif -%}

+ 1 - 1
templates/cranefly/resend_activation.html

@@ -19,7 +19,7 @@
       </div>
       {% endif %}
 
-      <form action="{% url 'send_activation' %}" method="post">
+      <form action="{{ url('send_activation') }}" method="post">
         <div class="form-fields">
           {{ form_theme.form_widget(form, width=6) }}
         </div>

+ 1 - 1
templates/cranefly/reset_password.html

@@ -19,7 +19,7 @@
       </div>
       {% endif %}
 
-      <form action="{% url 'forgot_password' %}" method="post">
+      <form action="{{ url('forgot_password') }}" method="post">
         <div class="form-fields">
           {{ form_theme.form_widget(form, width=6) }}
         </div>

+ 1 - 1
templates/cranefly/search/home.html

@@ -13,5 +13,5 @@
 {% endblock %}
 
 {% macro style_query(query) -%}
-<a href="{% url 'search_results' %}">{{ query }}</a>
+<a href="{{ url('search_results') }}">{{ query }}</a>
 {%- endmacro %}

+ 6 - 6
templates/cranefly/search/results.html

@@ -12,13 +12,13 @@
       <div class="result">
         <div class="result-avatar">
           {% if result.user_id %}
-          <a href="{% url 'user' user=result.user.pk, username=result.user.username_slug %}"><img src="{{ result.user.get_avatar(70) }}" alt=""></a>
+          <a href="{{ url('user', user=result.user.pk, username=result.user.username_slug) }}"><img src="{{ result.user.get_avatar(70) }}" alt=""></a>
           {% else %}
           <img src="{{ macros.avatar_guest(80) }}" alt="{{ resut.user_name }}">
           {% endif %}
         </div>
         <div class="result-content">
-          <h3><a href="{{ result.forum.thread_link('find')|url(thread=result.thread_id, slug=result.thread.slug, post=result.pk) }}">{{ result.thread.name }}</a></h3>
+          <h3><a href="{{ url(result.forum.thread_link('find'), thread=result.thread_id, slug=result.thread.slug, post=result.pk) }}">{{ result.thread.name }}</a></h3>
           <p class="post-preview">{{ result.post_clean|highlight(search_query, 320)|safe }}</p>
           <p class="post-extra">{% trans forum=forum(result.forum), user=username(result), date=result.date|reltimesince|low %}In {{ forum }} by {{ user }} {{ date }}{% endtrans %}</p>
         </div>
@@ -33,12 +33,12 @@
 {% endblock %}
 
 {% macro forum(forum) -%}
-<a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}" class="forum-link">{{ forum.name }}</a>
+<a href="{{ url('forum', forum=forum.pk, slug=forum.slug) }}" class="forum-link">{{ forum.name }}</a>
 {%- endmacro %}
 
 {% macro username(post) -%}
 {% if post.user_id -%}
-<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="user-link">{{ post.user.username }}</a>
+<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}" class="user-link">{{ post.user.username }}</a>
 {%- else -%}
 {{ post.user_name }}
 {%- endif %}
@@ -49,8 +49,8 @@
 <div class="pagination">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'search_results' page=pagination['prev'] %}{% else %}{% url 'search_results' %}{% endif %}" class="tooltip-top" title="{% trans %}Newer Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'search_results' page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('search_results', page=pagination['prev']) }}{% else %}{{ url('search_results') }}{% endif %}" class="tooltip-top" title="{% trans %}Newer Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('search_results', page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 6 - 6
templates/cranefly/signin.html

@@ -19,10 +19,10 @@
           {{ macros.draw_message_icon(message) }}
           <p><strong>{{ message.message }}</strong></p>
           {% if bad_password %}
-          <p><a href="{% url 'forgot_password' %}">{% trans %}Click here if you forgot your sign in credentials.{% endtrans %}</a></p>
+          <p><a href="{{ url('forgot_password') }}">{% trans %}Click here if you forgot your sign in credentials.{% endtrans %}</a></p>
           {% endif %}
           {% if not_active %}
-          <p><a href="{% url 'send_activation' %}">{% trans %}Click here if you didn't receive activation e-mail.{% endtrans %}</a></p>
+          <p><a href="{{ url('send_activation') }}">{% trans %}Click here if you didn't receive activation e-mail.{% endtrans %}</a></p>
           {% endif %}
           {% if banned_account.reason_user %}
           {{ banned_account.reason_user|markdown|safe }}
@@ -34,7 +34,7 @@
       </div>
       {% endif %}
 
-      <form class="form-horizontal" action="{% url 'sign_in' %}" method="post">
+      <form class="form-horizontal" action="{{ url('sign_in') }}" method="post">
         <div class="form-fields">
           {{ form_theme.form_widget(form, horizontal=true, width=6) }}
         </div>
@@ -44,10 +44,10 @@
 
             <h2>{% trans %}Problems Signing In?{% endtrans %}</h2>
             <ul class="unstyled">
-              <li><a href="{% url 'forgot_password' %}"><i class="icon-refresh"></i> {% trans %}I don't remember my password{% endtrans %}</a></li>
-              <li><a href="{% url 'send_activation' %}"><i class="icon-envelope"></i> {% trans %}I haven't received activation e-mail{% endtrans %}</a></li>
+              <li><a href="{{ url('forgot_password') }}"><i class="icon-refresh"></i> {% trans %}I don't remember my password{% endtrans %}</a></li>
+              <li><a href="{{ url('send_activation') }}"><i class="icon-envelope"></i> {% trans %}I haven't received activation e-mail{% endtrans %}</a></li>
               {% if settings.account_activation != 'block' %}
-              <li><a href="{% url 'register' %}"><i class="icon-edit"></i> {% trans %}I don't have account{% endtrans %}</a></li>
+              <li><a href="{{ url('register') }}"><i class="icon-edit"></i> {% trans %}I don't have account{% endtrans %}</a></li>
               {% endif %}
             </ul>
 

+ 7 - 7
templates/cranefly/threads/changelog.html

@@ -5,7 +5,7 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}
 {%- endblock %}
 
@@ -18,8 +18,8 @@
     </ul>
     <h1>{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %} <small>{{ thread.name }}</small></h1>
     <ul class="unstyled header-stats">
-      <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
       <li><i class="icon-pencil"></i> {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</li>
       {% if post.protected %}<li><i class="icon-lock"></i> {% trans %}Protected{% endtrans %}</li>{% endif %}
     </ul>
@@ -45,13 +45,13 @@
             </span>
           </td>
           <td>
-            <a href="{% url 'thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}" class="change-no">#{{ loop.revindex }}</a>
+            <a href="{{ url('thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}" class="change-no">#{{ loop.revindex }}</a>
             {% if edit.reason %}
             <div class="change-reason">
-              <a href="{% url 'thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}">{{ edit.reason }}</a>
+              <a href="{{ url('thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}">{{ edit.reason }}</a>
             </div>{% endif %}
             <div class="change-description">
-              <a href="{% url 'thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk %}">
+              <a href="{{ url('thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=edit.pk) }}">
               {% if edit.change != 0 %}{% if edit.change > 0 -%}
               {% trans chars=edit.change %}Added one character to post.{% pluralize %}Added {{ chars }} characters to post.{% endtrans %}
               {%- elif edit.change < 0 -%}
@@ -77,5 +77,5 @@
 
 
 {% macro edit_user(edit) -%}
-{% if edit.user_id %}<a href="{% url 'user' user=edit.user_id, username=edit.user_slug %}">{{ edit.user_name }}</a>{% else %}{{ edit.user_name }}{% endif %}
+{% if edit.user_id %}<a href="{{ url('user', user=edit.user_id, username=edit.user_slug) }}">{{ edit.user_name }}</a>{% else %}{{ edit.user_name }}{% endif %}
 {%- endmacro %}

+ 7 - 7
templates/cranefly/threads/changelog_diff.html

@@ -5,8 +5,8 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-<li><a href="{% url 'thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('thread_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %}
 {%- endblock %}
 
@@ -19,8 +19,8 @@
     </ul>
     <h1>{% trans date=change.date|reltimesince|low %}Edit from {{ date }}{% endtrans %} <small>{% trans post=post.pk %}Post #{{ post }} Changelog{% endtrans %}</small></h1>
     <ul class="unstyled header-stats pull-left">
-      <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if change.user_id %}<a href="{% url 'user' user=change.user_id, username=change.user_slug %}">{{ change.user_name }}</a>{% else %}{{ change.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if change.user_id %}<a href="{{ url('user', user=change.user_id, username=change.user_slug) }}">{{ change.user_name }}</a>{% else %}{{ change.user_name }}{% endif %}</li>
       {% if acl.users.can_see_users_trails() %}
       <li><i class="icon-globe"></i> {{ change.ip }}</li>
       <li><i class="icon-qrcode"></i> {{ change.agent }}</li>
@@ -50,7 +50,7 @@
     <div class="diff-extra">
       {{ pager() }}
       {% if user.is_authenticated() and acl.threads.can_make_revert(forum, thread) %}
-      <form class="form-inline pull-right" action="{% url 'thread_changelog_revert' thread=thread.pk, slug=thread.slug, post=post.pk, change=change.pk %}" method="post">
+      <form class="form-inline pull-right" action="{{ url('thread_changelog_revert', thread=thread.pk, slug=thread.slug, post=post.pk, change=change.pk) }}" method="post">
         <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
         <button type="submit" class="btn btn-danger">{% trans %}Revert this edit{% endtrans %}</button></li>
       </form>
@@ -87,8 +87,8 @@
 {% if prev or prev %}
 <div class="pagination pull-left">
   <ul>
-    {% if prev %}<li><a href="{% url 'thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=prev.pk %}"><i class="icon-chevron-left"></i> {{ prev.date|reldate }}</a></li>{% endif %}
-    {% if next %}<li><a href="{% url 'thread_changelog_diff' thread=thread.pk, slug=thread.slug, post=post.pk, change=next.pk %}">{{ next.date|reldate }} <i class="icon-chevron-right"></i></a></li>{% endif %}
+    {% if prev %}<li><a href="{{ url('thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=prev.pk) }}"><i class="icon-chevron-left"></i> {{ prev.date|reldate }}</a></li>{% endif %}
+    {% if next %}<li><a href="{{ url('thread_changelog_diff', thread=thread.pk, slug=thread.slug, post=post.pk, change=next.pk) }}">{{ next.date|reldate }} <i class="icon-chevron-right"></i></a></li>{% endif %}
   </ul>
 </div>
 {% endif %}

+ 3 - 3
templates/cranefly/threads/details.html

@@ -5,7 +5,7 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans post=post.pk %}Post #{{ post }} Info{% endtrans %}
 {%- endblock %}
 
@@ -18,8 +18,8 @@
     </ul>
     <h1>{% trans post=post.pk %}Post #{{ post }} Info{% endtrans %} <small>{{ thread.name }}</small></h1>
     <ul class="unstyled header-stats">
-      <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
       <li><i class="icon-pencil"></i> {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</li>
       {% if post.protected %}<li><i class="icon-lock"></i> {% trans %}Protected{% endtrans %}</li>{% endif %}
     </ul>

+ 4 - 4
templates/cranefly/threads/karmas.html

@@ -5,7 +5,7 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans post=post.pk %}Post #{{ post }} Votes{% endtrans %}
 {%- endblock %}
 
@@ -18,8 +18,8 @@
     </ul>
     <h1>{% trans post=post.pk %}Post #{{ post }} Votes{% endtrans %} <small>{{ thread.name }}</small></h1>
     <ul class="unstyled header-stats">
-      <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-      <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+      <li><i class="icon-time"></i> <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+      <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
       <li><i class="icon-thumbs-up"></i> {{ post.upvotes }}</li>
       <li><i class="icon-thumbs-down"></i> {{ post.downvotes }}</li>
     </ul>
@@ -112,5 +112,5 @@
 {% endblock %}
 
 {% macro vote_details(vote, icon) %}
-{% if vote.user_id %}<a href="{% url 'user' user=vote.user_id, username=vote.user_slug %}" class="vote-user vote-{{ vote.pk }}"><span class="vote-icon"><i class="icon-{{ icon }}"></i></span> {{ vote.user_name }}</a>{% else %}<span class="vote-user vote-{{ vote.pk }}"><span class="vote-icon"><i class="icon-{{ icon }}"></i></span> {{ vote.user_name }}</span>{% endif %}
+{% if vote.user_id %}<a href="{{ url('user', user=vote.user_id, username=vote.user_slug) }}" class="vote-user vote-{{ vote.pk }}"><span class="vote-icon"><i class="icon-{{ icon }}"></i></span> {{ vote.user_name }}</a>{% else %}<span class="vote-user vote-{{ vote.pk }}"><span class="vote-icon"><i class="icon-{{ icon }}"></i></span> {{ vote.user_name }}</span>{% endif %}
 {% endmacro %}

+ 20 - 20
templates/cranefly/threads/list.html

@@ -39,16 +39,16 @@
         <div class="forum-icon-wrap{% if subforum.type == 'redirect' %} forum-icon-redirect{% elif not subforum.is_read %} forum-icon-new{% endif %}"><i class="icon-{% if subforum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %} icon-white"></i></div>
       </div>
       <div id="forum-{{ subforum.id }}" class="forum-main">
-        <h3 class="forum-title{% if not subforum.is_read %} forum-title-new{% endif %}"><a href="{{ subforum.type|url(slug=subforum.slug, forum=subforum.id) }}">{{ subforum.name }}</a></h3>
+        <h3 class="forum-title{% if not subforum.is_read %} forum-title-new{% endif %}"><a href="{{ url(subforum.type, slug=subforum.slug, forum=subforum.id) }}">{{ subforum.name }}</a></h3>
         {% if subforum.show_details %}
         <div class="forum-details">
           {% if subforum.type != 'redirect' %}
           {% if acl.forums.can_browse(subforum) and (acl.threads.can_read_threads(subforum) == 2 or (acl.threads.can_read_threads(subforum) == 1 and subforum.last_poster_id == user.pk)) %}
           {% if subforum.last_thread_id -%}
           <div class="thread-name">
-            <a href="{% url 'thread_new' thread=subforum.last_thread_id, slug=subforum.last_thread_slug %}"{% if subforum.last_thread_name|length > 34 %} class="tooltip-top" title="{{ subforum.last_thread_name }}"{% endif %}>{{ subforum.last_thread_name|short_string(34) }}</a>
+            <a href="{{ url('thread_new', thread=subforum.last_thread_id, slug=subforum.last_thread_slug) }}"{% if subforum.last_thread_name|length > 34 %} class="tooltip-top" title="{{ subforum.last_thread_name }}"{% endif %}>{{ subforum.last_thread_name|short_string(34) }}</a>
           </div>
-          <div class="muted">{% if subforum.last_poster_id %}<a href="{% url 'user' user=subforum.last_poster_id, username=subforum.last_poster_slug %}" class="last-poster">{{ subforum.last_poster_name }}</a>{% else %}<span class="last-poster">{{ subforum.last_poster_name }}</span>{% endif %} - {{ subforum.last_thread_date|reltimesince }}</div>
+          <div class="muted">{% if subforum.last_poster_id %}<a href="{{ url('user', user=subforum.last_poster_id, username=subforum.last_poster_slug) }}" class="last-poster">{{ subforum.last_poster_name }}</a>{% else %}<span class="last-poster">{{ subforum.last_poster_name }}</span>{% endif %} - {{ subforum.last_thread_date|reltimesince }}</div>
           {%- else -%}
           <em>{% trans %}This forum is empty{% endtrans %}</em>
           {%- endif %}
@@ -57,7 +57,7 @@
           {%- endif %}
           {%- else -%}
           <div class="thread-name">
-            <a href="{% url 'redirect' slug=subforum.slug, forum=subforum.id %}">{{ subforum.redirect_domain() }}</a>
+            <a href="{{ url('redirect', slug=subforum.slug, forum=subforum.id) }}">{{ subforum.redirect_domain() }}</a>
           </div>
           <div class="muted">{% trans count=subforum.redirects, clicks=macros.wrap(subforum.redirects|intcomma, 'span', 'class="last-poster"') %}{{ clicks }} click{% pluralize %}{{ clicks }} clicks{% endtrans %}</div>
           {%- endif %}
@@ -66,18 +66,18 @@
         {% if subforum.subforums %}
         <div class="dropdown">
           {% if subforum.subforums|length > 1 %}
-          <a href="{{ subforum.type|url(slug=subforum.slug, forum=subforum.id) }}#subforums" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-chevron-down"></i> {% trans %}Subforums{% endtrans %}</a>
+          <a href="{{ url(subforum.type, slug=subforum.slug, forum=subforum.id) }}#subforums" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-chevron-down"></i> {% trans %}Subforums{% endtrans %}</a>
           <div class="dropdown-menu" role="menu" aria-labelledby="dLabel">
             <div class="dropdown-shadow">
               <ul>
                 {% for subsubforum in subforum.subforums %}
-                <li><a href="{{ subsubforum.type|url(slug=subsubforum.slug, forum=subsubforum.id) }}"><i class="icon-{% if subsubforum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %}"></i> {{ subsubforum.name }}</a></li>
+                <li><a href="{{ url(subsubforum.type, slug=subsubforum.slug, forum=subsubforum.id) }}"><i class="icon-{% if subsubforum.type == 'redirect' %}circle-arrow-right{% else %}comment{% endif %}"></i> {{ subsubforum.name }}</a></li>
                 {% endfor %}
               </ul>
             </div>
           </div>
           {% else %}
-          <a href="{{ subforum.subforums[0].type|url(slug=subforum.subforums[0].slug, forum=subforum.subforums[0].id) }}" class="subforum tooltip-top" title="{% trans subforum=subforum.subforums[0].name %}Go to the {{ subforum }} subforum{% endtrans %}">{{ subforum.subforums[0].name|short_string(16) }}</a>
+          <a href="{{ url(subforum.subforums[0].type, slug=subforum.subforums[0].slug, forum=subforum.subforums[0].id) }}" class="subforum tooltip-top" title="{% trans subforum=subforum.subforums[0].name %}Go to the {{ subforum }} subforum{% endtrans %}">{{ subforum.subforums[0].name|short_string(16) }}</a>
           {% endif %}
         </div>
         {% endif%}
@@ -107,7 +107,7 @@
   <div class="forum-threads-extra extra-top">
     {{ pager() }}
     {% if user.is_authenticated() and acl.threads.can_start_threads(forum) %}
-    <a href="{% url 'thread_start' forum=forum.pk, slug=forum.slug %}" class="btn btn-inverse pull-right"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a>
+    <a href="{{ url('thread_start', forum=forum.pk, slug=forum.slug) }}" class="btn btn-inverse pull-right"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a>
     {% endif %}
   </div>
 
@@ -130,14 +130,14 @@
       <div class="row-fluid">
         <div class="span7">
           {% if thread.is_read %}
-          <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-last tooltip-top" title="{% trans %}Click to see last post{% endtrans %}"><i class="icon-asterisk"></i></a>
           {% else %}
-          <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
+          <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}" class="thread-icon thread-icon-new tooltip-top" title="{% trans %}Click to see first unread post{% endtrans %}"><i class="icon-fire"></i></a>
           {% endif %}
 
           {{ macros.thread_flags(thread) }}
           
-          <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="thread-name">{{ thread.name }}</a>
+          <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="thread-name">{{ thread.name }}</a>
           
           <div class="thread-details">
             {% trans user=thread_starter(thread), start=thread.start|reldate|low %}by {{ user }}, {{ start }}{% endtrans %}
@@ -149,7 +149,7 @@
           {% if settings.avatars_on_threads_list %}
           <div class="thread-last-avatar">
             {% if thread.last_poster_id %}
-            <a href="{% url 'user' user=thread.last_poster.pk, username=thread.last_poster.username_slug %}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
+            <a href="{{ url('user', user=thread.last_poster.pk, username=thread.last_poster.username_slug) }}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
             {% else %}
             <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
             {% endif %}
@@ -187,9 +187,9 @@
   <div class="forum-threads-extra">
     {{ pager() }}
     {% if user.is_authenticated() and acl.threads.can_start_threads(forum) %}
-    <a href="{% url 'thread_start' forum=forum.pk, slug=forum.slug %}" class="btn btn-inverse pull-right"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a>
+    <a href="{{ url('thread_start', forum=forum.pk, slug=forum.slug) }}" class="btn btn-inverse pull-right"><i class="icon-plus"></i> {% trans %}New Thread{% endtrans %}</a>
     {% elif not user.is_authenticated() and not user.is_crawler() %}
-    <p class="lead threads-signin-message"><a href="{% url 'sign_in' %}">{% trans %}Sign in or register to start threads.{% endtrans %}</a></p>
+    <p class="lead threads-signin-message"><a href="{{ url('sign_in') }}">{% trans %}Sign in or register to start threads.{% endtrans %}</a></p>
     {% endif %}
   </div>
 
@@ -214,7 +214,7 @@
 {%- endmacro %}
 
 {% macro forum_thread(forum) -%}
-<a href="{% url 'thread_new' thread=forum.last_thread_id, slug=forum.last_thread_slug %}">{{ forum.last_thread_name }}</a>
+<a href="{{ url('thread_new', thread=forum.last_thread_id, slug=forum.last_thread_slug) }}">{{ forum.last_thread_name }}</a>
 {%- endmacro %}
 
 {% macro redirect_stats(forum) -%}
@@ -238,11 +238,11 @@
 {%- endmacro %}
 
 {% macro thread_starter(thread) -%}
-{% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
+{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro thread_reply(thread) -%}
-{% if thread.last_poster_id %}<a href="{% url 'user' user=thread.last_poster_id, username=thread.last_poster_slug %}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
+{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro pager() %}
@@ -250,9 +250,9 @@
 <div class="pagination pull-left">
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'forum' slug=forum.slug, forum=forum.id %}" class="tooltip-top" title="{% trans %}First Page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'forum' slug=forum.slug, forum=forum.id, page=pagination['prev'] %}{% else %}{% url 'forum' slug=forum.slug, forum=forum.id %}{% endif %}" class="tooltip-top" title="{% trans %}Newest Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'forum' slug=forum.slug, forum=forum.id, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('forum', slug=forum.slug, forum=forum.id) }}" class="tooltip-top" title="{% trans %}First Page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('forum', slug=forum.slug, forum=forum.id, page=pagination['prev']) }}{% else %}{{ url('forum', slug=forum.slug, forum=forum.id) }}{% endif %}" class="tooltip-top" title="{% trans %}Newest Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('forum', slug=forum.slug, forum=forum.id, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
   </ul>
 </div>
 {% endif %}

+ 3 - 3
templates/cranefly/threads/merge.html

@@ -6,7 +6,7 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{{ forum.type|url(forum=forum.pk, slug=forum.slug) }}">{{ forum.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url(forum.type, forum=forum.pk, slug=forum.slug) }}">{{ forum.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans %}Merge Threads{% endtrans %}
 {%- endblock %}
 
@@ -41,7 +41,7 @@
         </div>
         {% endif %}
 
-        <form action="{% url 'forum' forum=forum.pk, slug=forum.slug %}" method="post">
+        <form action="{{ url('forum', forum=forum.pk, slug=forum.slug) }}" method="post">
           <input type="hidden" name="origin" value="merge_form">
           <input type="hidden" name="list_action" value="merge">
           {% for thread in threads -%}
@@ -52,7 +52,7 @@
           </div>
           <div class="form-actions">
             <button type="submit" class="btn btn-primary">{% trans %}Merge Threads{% endtrans %}</button>
-            <a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}" class="btn">{% trans %}Cancel{% endtrans %}</a>
+            <a href="{{ url('forum', forum=forum.pk, slug=forum.slug) }}" class="btn">{% trans %}Cancel{% endtrans %}</a>
           </div>
         </form>
 

+ 3 - 3
templates/cranefly/threads/move_posts.html

@@ -6,7 +6,7 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans %}Move Posts{% endtrans %}
 {%- endblock %}
 
@@ -36,7 +36,7 @@
         </div>
         {% endif %}
 
-        <form action="{% url 'thread' thread=thread.pk, slug=thread.slug %}" method="post">
+        <form action="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" method="post">
           <input type="hidden" name="origin" value="posts_form">
           <input type="hidden" name="list_action" value="move">
           <input type="hidden" name="do" value="move">
@@ -48,7 +48,7 @@
           </div>
           <div class="form-actions">
             <button type="submit" class="btn btn-primary">{% trans %}Move Posts{% endtrans %}</button>
-            <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="btn">{% trans %}Cancel{% endtrans %}</a>
+            <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="btn">{% trans %}Cancel{% endtrans %}</a>
           </div>
         </form>
 

+ 3 - 3
templates/cranefly/threads/move_thread.html

@@ -6,7 +6,7 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans %}Move Thread{% endtrans %}
 {%- endblock %}
 
@@ -36,7 +36,7 @@
         </div>
         {% endif %}
 
-        <form action="{% url 'thread' thread=thread.pk, slug=thread.slug %}" method="post">
+        <form action="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" method="post">
           <input type="hidden" name="origin" value="thread_form">
           <input type="hidden" name="thread_action" value="move">
           <input type="hidden" name="do" value="move">
@@ -49,7 +49,7 @@
           </div>
           <div class="form-actions">
             <button type="submit" class="btn btn-primary">{% trans %}Move Thread{% endtrans %}</button>
-            <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="btn">{% trans %}Cancel{% endtrans %}</a>
+            <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="btn">{% trans %}Cancel{% endtrans %}</a>
           </div>
         </form>
 

+ 3 - 3
templates/cranefly/threads/move_threads.html

@@ -6,7 +6,7 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{{ forum.type|url(forum=forum.pk, slug=forum.slug) }}">{{ forum.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url(forum.type, forum=forum.pk, slug=forum.slug) }}">{{ forum.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans %}Move Threads{% endtrans %}
 {%- endblock %}
 
@@ -36,7 +36,7 @@
         </div>
         {% endif %}
 
-        <form action="{% url 'forum' forum=forum.pk, slug=forum.slug %}" method="post">
+        <form action="{{ url('forum', forum=forum.pk, slug=forum.slug) }}" method="post">
           <input type="hidden" name="origin" value="move_form">
           <input type="hidden" name="list_action" value="move">
           {% for thread in threads -%}
@@ -47,7 +47,7 @@
           </div>
           <div class="form-actions">
             <button type="submit" class="btn btn-primary">{% trans %}Move Threads{% endtrans %}</button>
-            <a href="{% url 'forum' forum=forum.pk, slug=forum.slug %}" class="btn">{% trans %}Cancel{% endtrans %}</a>
+            <a href="{{ url('forum', forum=forum.pk, slug=forum.slug) }}" class="btn">{% trans %}Cancel{% endtrans %}</a>
           </div>
         </form>
 

+ 12 - 12
templates/cranefly/threads/posting.html

@@ -11,8 +11,8 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{{ forum.type|url(forum=forum.pk, slug=forum.slug) }}">{{ forum.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
-{% if thread %}<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>{% endif %}
+<li><a href="{{ url(forum.type, forum=forum.pk, slug=forum.slug) }}">{{ forum.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+{% if thread %}<li><a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>{% endif %}
 <li class="active">{{ get_title() }}
 {%- endblock %}
 
@@ -116,17 +116,17 @@
 
 {% macro get_action() -%}
 {% if action == 'new_thread' -%}
-{% url 'thread_start' forum=forum.pk, slug=forum.slug %}
+{{ url('thread_start', forum=forum.pk, slug=forum.slug) }}
 {%- elif action == 'edit_thread' -%}
-{% url 'thread_edit' thread=thread.pk, slug=thread.slug %}
+{{ url('thread_edit', thread=thread.pk, slug=thread.slug) }}
 {%- elif action in 'new_reply' -%}
 {%- if quote -%}
-{% url 'thread_reply' thread=thread.pk, slug=thread.slug, quote=quote.pk %}
+{{ url('thread_reply', thread=thread.pk, slug=thread.slug, quote=quote.pk) }}
 {%- else -%}
-{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}
+{{ url('thread_reply', thread=thread.pk, slug=thread.slug) }}
 {%- endif -%}
 {%- elif action == 'edit_reply' -%}
-{% url 'post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}
+{{ url('post_edit', thread=thread.pk, slug=thread.slug, post=post.pk) }}
 {%- endif %}
 {%- endmacro %}
 
@@ -147,8 +147,8 @@
 {% macro get_info() -%}
 {% if action == 'edit_reply' -%}
     {% if post.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
-    <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}">{{ post.date|reltimesince }}</a></li>
-    <li><i class="icon-user"></i> {% if post.user %}<a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
+    <li><i class="icon-time"></i> <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{{ post.date|reltimesince }}</a></li>
+    <li><i class="icon-user"></i> {% if post.user %}<a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}">{{ post.user.username }}</a>{% else %}{{ post.user_name }}{% endif %}</li>
     <li><i class="icon-pencil"></i> {% if post.edits > 0 -%}
       {% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}
     {%- else -%}
@@ -157,11 +157,11 @@
 {%- else -%}
     {% if thread.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
     {% if action == 'edit_thread' %}
-    <li><i class="icon-time"></i> <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=thread.start_post_id %}">{{ thread.start|reltimesince }}</a></li>
+    <li><i class="icon-time"></i> <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=thread.start_post_id) }}">{{ thread.start|reltimesince }}</a></li>
     {% else %}
-    <li><i class="icon-time"></i> <a href="{% url 'thread_new' thread=thread.pk, slug=thread.slug %}">{{ thread.last|reltimesince }}</a></li>
+    <li><i class="icon-time"></i> <a href="{{ url('thread_new', thread=thread.pk, slug=thread.slug) }}">{{ thread.last|reltimesince }}</a></li>
     {% endif %}
-    <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
+    <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
     <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
       {% trans count=thread.replies, replies=thread.replies|intcomma %}One reply{% pluralize %}{{ replies }} replies{% endtrans %}
     {%- else -%}

+ 3 - 3
templates/cranefly/threads/split.html

@@ -6,7 +6,7 @@
 
 {% block breadcrumb %}{{ super() }} <span class="divider"><i class="icon-chevron-right"></i></span></li>
 {{ macros.parents_list(parents) }}
-<li><a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
+<li><a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}">{{ thread.name }}</a> <span class="divider"><i class="icon-chevron-right"></i></span></li>
 <li class="active">{% trans %}Split Thread{% endtrans %}
 {%- endblock %}
 
@@ -36,7 +36,7 @@
         </div>
         {% endif %}
 
-        <form action="{% url 'thread' thread=thread.pk, slug=thread.slug %}" method="post">
+        <form action="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" method="post">
           <input type="hidden" name="origin" value="posts_form">
           <input type="hidden" name="list_action" value="split">
           <input type="hidden" name="do" value="split">
@@ -48,7 +48,7 @@
           </div>
           <div class="form-actions">
             <button type="submit" class="btn btn-primary">{% trans %}Split Thread{% endtrans %}</button>
-            <a href="{% url 'thread' thread=thread.pk, slug=thread.slug %}" class="btn">{% trans %}Cancel{% endtrans %}</a>
+            <a href="{{ url('thread', thread=thread.pk, slug=thread.slug) }}" class="btn">{% trans %}Cancel{% endtrans %}</a>
           </div>
         </form>
 

+ 52 - 52
templates/cranefly/threads/thread.html

@@ -21,7 +21,7 @@
     <ul class="unstyled header-stats">
       {% if thread.moderated %}<li><i class="icon-eye-close"></i> {% trans %}Not Reviewed{% endtrans %}</li>{% endif %}
       <li><i class="icon-time"></i> {{ thread.last|reltimesince }}</li>
-      <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
+      <li><i class="icon-user"></i> {% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}</li>
       <li><i class="icon-comment"></i> {% if thread.replies > 0 -%}
         {% trans count=thread.replies, replies=thread.replies|intcomma %}One reply{% pluralize %}{{ replies }} replies{% endtrans %}
       {%- else -%}
@@ -43,21 +43,21 @@
     {{ pager() }}
     {% if user.is_authenticated() %}    
     {% if acl.threads.can_reply(forum, thread) %}
-    <a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
+    <a href="{{ url('thread_reply', thread=thread.pk, slug=thread.slug) }}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
     {% endif %}
     {% if watcher %}
-    <form action="{% url 'thread_unwatch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
+    <form action="{{ url('thread_unwatch', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Remove thread from watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
     {% if watcher.email %}
-    <form action="{% url 'thread_unwatch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form>
+    <form action="{{ url('thread_unwatch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn btn-success tooltip-top" title="{% trans %}Don't e-mail me anymore if anyone replies to this thread{% endtrans %}"><i class="icon-envelope"></i></button></form>
     {% else %}
-    <form action="{% url 'thread_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
+    <form action="{{ url('thread_watch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}E-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
     {% endif %}
     {% else %}
-    <form action="{% url 'thread_watch' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
-    <form action="{% url 'thread_watch_email' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
+    <form action="{{ url('thread_watch', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list{% endtrans %}"><i class="icon-bookmark"></i></button></form>
+    <form action="{{ url('thread_watch_email', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><input type="hidden" name="retreat" value="{{ request_path }}"><button type="submit" class="btn tooltip-top" title="{% trans %}Add thread to watched list and e-mail me if anyone replies{% endtrans %}"><i class="icon-envelope"></i></button></form>
     {% endif %}
     {% if ignored_posts %}
-    <form action="{% url 'thread_show_hidden' thread=thread.pk, slug=thread.slug %}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn"><i class="icon-eye-open"></i> {% trans %}Show Hidden Replies{% endtrans %}</button></form>
+    <form action="{{ url('thread_show_hidden', thread=thread.pk, slug=thread.slug) }}" class="form-inline pull-right" method="post"><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"><button type="submit" class="btn"><i class="icon-eye-open"></i> {% trans %}Show Hidden Replies{% endtrans %}</button></form>
     {% endif %}
     {% endif %}
   </div>
@@ -73,7 +73,7 @@
       {% if post.deleted and not acl.threads.can_see_deleted_posts(forum) %}
       <div class="post-body post-muted">
         {% if post.user_id %}
-        <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(50) }}" alt="" class="user-avatar"></a>
+        <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}"><img src="{{ post.user.get_avatar(50) }}" alt="" class="user-avatar"></a>
         {% else %}
         <img src="{{ macros.avatar_guest(60) }}" alt="" class="user-avatar">
         {% endif %}
@@ -81,23 +81,23 @@
           <div class="post-header">
             <div class="post-header-compact">
               {% if post.user_id %}
-              <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
+              <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
               {% else %}
               <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
               {% endif %}
               <span class="separator">&ndash;</span>
-              <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
+              <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-date">{{ post.date|reltimesince }}</a>
               {% if post.edits %}
               <span class="separator">&ndash;</span>
               {% if acl.threads.can_see_changelog(user, forum, post) %}
-              <a href="{% url 'thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
+              <a href="{{ url('thread_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
               {% else %}
               <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
               {% endif %}
               {% endif %}
             </div>
 
-            <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
+            <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
 
             {% if not post.is_read %}
             <div class="post-extra">
@@ -120,10 +120,10 @@
         <div class="post-content">
           <div class="post-header">
             <div class="post-header-compact">
-              <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
+              <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-date">{{ post.date|reltimesince }}</a>
             </div>
 
-            <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
+            <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
 
             {% if not post.is_read %}
             <div class="post-extra">
@@ -142,7 +142,7 @@
       {% else %}
       <div class="post-body">
         {% if post.user_id %}
-        <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}"><img src="{{ post.user.get_avatar(100) }}" alt="" class="user-avatar"></a>
+        <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}"><img src="{{ post.user.get_avatar(100) }}" alt="" class="user-avatar"></a>
         {% else %}
         <img src="{{ macros.avatar_guest(100) }}" alt="" class="user-avatar">
         {% endif %}
@@ -150,16 +150,16 @@
         <div class="post-content">
           <div class="post-header">
             {% if post.user_id %}
-            <a href="{% url 'user' user=post.user.pk, username=post.user.username_slug %}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
+            <a href="{{ url('user', user=post.user.pk, username=post.user.username_slug) }}" class="post-author">{{ post.user.username }}</a>{% if post.user.get_title() %} {{ user_label(post.user) }}{% endif %}
             {% else %}
             <span class="post-author">{{ post.user_name }}</span> <span class="label post-author-label post-label-guest">{% trans %}Unregistered{% endtrans %}</span>
             {% endif %}
             <span class="separator">&ndash;</span>
-            <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-date">{{ post.date|reltimesince }}</a>
+            <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-date">{{ post.date|reltimesince }}</a>
             {% if post.edits %}
             <span class="separator">&ndash;</span>
             {% if acl.threads.can_see_changelog(user, forum, post) %}
-            <a href="{% url 'thread_changelog' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
+            <a href="{{ url('thread_changelog', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-changelog tooltip-bottom" title="{% trans %}Show changelog{% endtrans %}">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</a>
             {% else %}
             <span class="post-changelog">{% trans edits=post.edits %}One edit{% pluralize %}{{ edits }} edits{% endtrans %}</span>
             {% endif %}
@@ -169,7 +169,7 @@
             <label class="checkbox post-checkbox"><input form="posts_form" name="{{ posts_form['list_items']['html_name'] }}" type="checkbox" class="checkbox-member" value="{{ post.pk }}"{% if posts_form['list_items']['has_value'] and ('' ~ post.pk) in posts_form['list_items']['value'] %} checked="checked"{% endif %}></label>
             {% endif %}
 
-            <a href="{% url 'thread_find' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
+            <a href="{{ url('thread_find', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-perma tooltip-left" title="{% trans %}Direct link to this post{% endtrans %}">#{{ pagination['start'] + loop.index }}</a>
 
             <div class="post-extra">
               {% if post.protected and acl.threads.can_protect(forum) %}
@@ -227,7 +227,7 @@
                 <span class="post-score post-score-upvotes{% if post.upvotes %} post-score-good{% endif %}">{{ post.upvotes }}</span>
                 {% endif %}
                 {% if user.is_authenticated() and user.pk != post.user_id and acl.threads.can_upvote_posts(forum) %}
-                <form action="{% url 'post_upvote' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline form-upvote" method="post">
+                <form action="{{ url('post_upvote', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline form-upvote" method="post">
                   <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                   <button type="submit" class="btn btn-link post-like"{% if post.karma_vote and post.karma_vote.score > 0 %} disabled="disabled"{% endif %}>{% trans %}Like{% endtrans %}</button>
                 </form>
@@ -240,7 +240,7 @@
                 <span class="post-score post-score-downvotes{% if post.downvotes %} post-score-bad{% endif %}">{{ post.downvotes }}</span>
               {% endif %}
                 {% if user.is_authenticated() and user.pk != post.user_id and acl.threads.can_downvote_posts(forum) %}
-                <form action="{% url 'post_downvote' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline form-downvote" method="post">
+                <form action="{{ url('post_downvote', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline form-downvote" method="post">
                   <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                   <button type="submit" class="btn btn-link post-hate"{% if post.karma_vote and post.karma_vote.score < 0 %} disabled="disabled"{% endif %}>{% trans %}Dislike{% endtrans %}</button>
                 </form>
@@ -250,7 +250,7 @@
               </div>
               {% if acl.threads.can_see_post_votes(forum) %}
               <div class="post-rating">
-                <a href="{% url 'post_votes' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans %}Show Votes{% endtrans %}</a>
+                <a href="{{ url('post_votes', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{% trans %}Show Votes{% endtrans %}</a>
               </div>
               {% endif %}
             </div>
@@ -259,41 +259,41 @@
             {% if user.is_authenticated() %}
             <div class="post-actions">
               {% if acl.users.can_see_users_trails() -%}
-              <a href="{% url 'post_info' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-trail">{% trans %}Info{% endtrans %}</a>
+              <a href="{{ url('post_info', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-trail">{% trans %}Info{% endtrans %}</a>
               {% endif %}
               {% if post.reported and acl.reports.can_handle() and acl.threads.can_mod_posts(forum) %}
-              <a href="{% url 'post_report_show' thread=thread.pk, slug=thread.slug, post=post.pk %}">{% trans %}Show report{% endtrans %}</a>
+              <a href="{{ url('post_report_show', thread=thread.pk, slug=thread.slug, post=post.pk) }}">{% trans %}Show report{% endtrans %}</a>
               {% endif %}
               {% if acl.reports.can_report() %}
-              <form action="{% url 'post_report' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline form-report" method="post" autocomplete="off">
+              <form action="{{ url('post_report', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline form-report" method="post" autocomplete="off">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-report tooltip-top" title="{% trans %}Bring this post to moderator attention.{% endtrans %}">{% trans %}Report{% endtrans %}</button>
               </form>
               {% endif %}
               {% if acl.threads.can_edit_thread(user, forum, thread, post) and thread.start_post_id == post.pk %}
-              <a href="{% url 'thread_edit' thread=thread.pk, slug=thread.slug %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
+              <a href="{{ url('thread_edit', thread=thread.pk, slug=thread.slug) }}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
               {% elif acl.threads.can_edit_reply(user, forum, thread, post) %}
-              <a href="{% url 'post_edit' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
+              <a href="{{ url('post_edit', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="post-edit">{% trans %}Edit{% endtrans %}</a>
               {%- endif %}
-              {% if acl.threads.can_reply(forum, thread) %}<a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug, quote=post.pk %}" class="post-reply">{% trans %}Reply{% endtrans %}</a>{% endif %}
+              {% if acl.threads.can_reply(forum, thread) %}<a href="{{ url('thread_reply', thread=thread.pk, slug=thread.slug, quote=post.pk) }}" class="post-reply">{% trans %}Reply{% endtrans %}</a>{% endif %}
             </div>
             {% if post.pk == thread.start_post_id %}
             <div class="post-actions">
               {% if acl.threads.can_delete_thread(user, forum, thread, post) %}
               {% if post.deleted %}
-              <form action="{% url 'thread_show' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
+              <form action="{{ url('thread_show', thread=thread.pk, slug=thread.slug) }}" class="form-inline" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Make this thread visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
               </form>
               {% else %}
-              <form action="{% url 'thread_hide' thread=thread.pk, slug=thread.slug %}" class="form-inline" method="post">
+              <form action="{{ url('thread_hide', thread=thread.pk, slug=thread.slug) }}" class="form-inline" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Hide this thread from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
               </form>
               {% endif %}
               {% endif %}
               {% if acl.threads.can_delete_thread(user, forum, thread, post) == 2 %}
-              <form action="{% url 'thread_delete' thread=thread.pk, slug=thread.slug %}" class="form-inline prompt-delete-thread" method="post">
+              <form action="{{ url('thread_delete', thread=thread.pk, slug=thread.slug) }}" class="form-inline prompt-delete-thread" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this thread for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
               </form>
@@ -303,19 +303,19 @@
             <div class="post-actions">
               {% if acl.threads.can_delete_post(user, forum, thread, post) %}
               {% if post.deleted %}
-              <form action="{% url 'post_show' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
+              <form action="{{ url('post_show', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Make this reply visible to other users{% endtrans %}">{% trans %}Restore{% endtrans %}</button>
               </form>
               {% else %}
-              <form action="{% url 'post_hide' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline" method="post">
+              <form action="{{ url('post_hide', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link btn-hide tooltip-top" title="{% trans %}Hide this reply from other users{% endtrans %}">{% trans %}Hide{% endtrans %}</button>
               </form>
               {% endif %}
               {% endif %}
               {% if acl.threads.can_delete_post(user, forum, thread, post) == 2 -%}
-              <form action="{% url 'post_delete' thread=thread.pk, slug=thread.slug, post=post.pk %}" class="form-inline prompt-delete-post" method="post">
+              <form action="{{ url('post_delete', thread=thread.pk, slug=thread.slug, post=post.pk) }}" class="form-inline prompt-delete-post" method="post">
                 <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
                 <button type="submit" class="btn btn-link tooltip-top" title="{% trans %}Delete this reply for good{% endtrans %}">{% trans %}Delete{% endtrans %}</button>
               </form>
@@ -353,13 +353,13 @@
           {% if user.is_authenticated() %}
           {% if acl.threads.can_delete_checkpoint(forum) %}
           {% if checkpoint.deleted %}
-          <form action="{% url 'post_checkpoint_show' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
+          <form action="{{ url('post_checkpoint_show', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline">
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
             <button type="submit" class="btn btn-link btn-show">{% trans %}Restore{% endtrans %}</button>
           </form>
           {% else %}
-          <form action="{% url 'post_checkpoint_hide' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline">
+          <form action="{{ url('post_checkpoint_hide', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline">
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
             <button type="submit" class="btn btn-link btn-hide">{% trans %}Hide{% endtrans %}</button>
@@ -367,7 +367,7 @@
           {% endif %}
           {% endif %}
           {% if acl.threads.can_delete_checkpoint(forum) == 2 %}
-          <form action="{% url 'post_checkpoint_delete' slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk %}" method="post" class="form-inline prompt-delete-checkpoint">
+          <form action="{{ url('post_checkpoint_delete', slug=thread.slug, thread=thread.pk, checkpoint=checkpoint.pk) }}" method="post" class="form-inline prompt-delete-checkpoint">
             <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
             <input type="hidden" name="retreat" value="{{ request_path }}#post-{{ post.pk }}">
             <button type="submit" class="btn btn-link btn-delete">{% trans %}Delete{% endtrans %}</button>
@@ -406,15 +406,15 @@
   <div class="thread-buttons">
     {{ pager(false) }}
     {% if user.is_authenticated() and acl.threads.can_reply(forum, thread) %}
-    <a href="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
+    <a href="{{ url('thread_reply', thread=thread.pk, slug=thread.slug) }}" class="btn btn-inverse pull-right"><i class="icon-pencil"></i> {% trans %}Reply{% endtrans %}</a>
     {% elif not user.is_authenticated() and not user.is_crawler() %}
-    <p class="lead thread-signin-message"><a href="{% url 'sign_in' %}">{% trans %}Sign in or register to reply.{% endtrans %}</a></p>
+    <p class="lead thread-signin-message"><a href="{{ url('sign_in') }}">{% trans %}Sign in or register to reply.{% endtrans %}</a></p>
     {% endif %}
   </div>
 
   {% if user.is_authenticated() and acl.threads.can_reply(forum, thread) %}
   <div class="thread-quick-reply">
-    <form action="{% url 'thread_reply' thread=thread.pk, slug=thread.slug %}" method="post">
+    <form action="{{ url('thread_reply', thread=thread.pk, slug=thread.slug) }}" method="post">
       <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
       <input type="hidden" name="quick_reply" value="1">
       <img src="{{ user.get_avatar(100) }}" alt="{% trans %}Your Avatar{% endtrans %}" class="user-avatar">
@@ -487,7 +487,7 @@
 
 
 {% macro user_label(user) -%}
-<{% if user.rank and user.rank.as_tab %}a href="{% url 'users' slug=user.rank.slug %}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
+<{% if user.rank and user.rank.as_tab %}a href="{{ url('users', slug=user.rank.slug) }}"{% else %}span{% endif %} class="label post-author-label{% if user.rank and user.rank.style %} post-label-{{ user.rank.style }}{% endif %}">{{ user.get_title() }}</{% if user.rank and user.rank.as_tab%}a{% else %}span{% endif %}>
 {%- endmacro %}
 
 
@@ -496,15 +496,15 @@
   <ul>
     {% if pagination['total'] > 0 %}
     <li class="count">{{ macros.pager_label(pagination) }}</li>
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['prev'] %}{% else %}{% url 'thread' slug=thread.slug, thread=thread.id %}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Newest Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{% url 'thread' slug=thread.slug, thread=thread.id, page=pagination['total'] %}" class="tooltip-top" title="{% trans %}Go to last page{% endtrans %}">{% trans %}Last{% endtrans %} <i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('thread', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first page{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}First{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('thread', slug=thread.slug, thread=thread.id, page=pagination['prev']) }}{% else %}{{ url('thread', slug=thread.slug, thread=thread.id) }}{% endif %}" class="tooltip-top" title="{% trans %}Older Posts{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('thread', slug=thread.slug, thread=thread.id, page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Newest Posts{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 and pagination['next'] < pagination['total'] %}<li><a href="{{ url('thread', slug=thread.slug, thread=thread.id, page=pagination['total']) }}" class="tooltip-top" title="{% trans %}Go to last page{% endtrans %}">{% trans %}Last{% endtrans %} <i class="icon-chevron-right"></i></a></li>{% endif -%}
     {% endif %}
     {% if extra and user.is_authenticated() %}
-    {% if not is_read %}<li><a href="{% url 'thread_new' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
-    {% if thread.replies_moderated > 0 and acl.threads.can_approve(forum) %}<li><a href="{% url 'thread_moderated' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first post awaiting review{% endtrans %}"><i class="icon-eye-close"></i> {% trans %}First Unreviewed{% endtrans %}</a></li>{% endif %}
-    {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{% url 'thread_reported' slug=thread.slug, thread=thread.id %}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
+    {% if not is_read %}<li><a href="{{ url('thread_new', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first unread{% endtrans %}"><i class="icon-star"></i> {% trans %}First Unread{% endtrans %}</a></li>{% endif %}
+    {% if thread.replies_moderated > 0 and acl.threads.can_approve(forum) %}<li><a href="{{ url('thread_moderated', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first post awaiting review{% endtrans %}"><i class="icon-eye-close"></i> {% trans %}First Unreviewed{% endtrans %}</a></li>{% endif %}
+    {% if thread.replies_reported > 0 and acl.threads.can_mod_posts(thread) %}<li><a href="{{ url('thread_reported', slug=thread.slug, thread=thread.id) }}" class="tooltip-top" title="{% trans %}Go to first reported post{% endtrans %}"><i class="icon-fire"></i> {% trans %}First Reported{% endtrans %}</a></li>{% endif %}
     {% endif %}
   </ul>
 </div>
@@ -513,7 +513,7 @@
 
 {% macro checkpoint_user(checkpoint) -%}
 {%- if checkpoint.user_id -%}
-<a href="{{ 'user'|url(user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
+<a href="{{ url('user', user=checkpoint.user_id, username=checkpoint.user_slug) }}">{{ checkpoint.user_name }}</a>
 {%- else -%}
 <strong>{{ checkpoint.user_name }}</strong>
 {%- endif -%}
@@ -522,7 +522,7 @@
 
 {% macro checkpoint_forum(checkpoint) -%}
 {%- if checkpoint.old_forum_id -%}
-<a href="{% url 'forum' forum=checkpoint.old_forum_id, slug=checkpoint.old_forum_slug %}">{{ checkpoint.old_forum_name }}</a>
+<a href="{{ url('forum', forum=checkpoint.old_forum_id, slug=checkpoint.old_forum_slug) }}">{{ checkpoint.old_forum_name }}</a>
 {%- else -%}
 <strong>{{ checkpoint.old_forum_name }}</strong>
 {%- endif -%}
@@ -531,7 +531,7 @@
 
 {% macro edit_user(post) -%}
 {%- if post.edit_user_id -%}
-<a href="{{ 'user'|url(user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
+<a href="{{ url('user', user=post.edit_user_id, username=post.edit_user_slug) }}">{{ post.edit_user_name }}</a>
 {%- else -%}
 <strong>{{ post.edit_user_name }}</strong>
 {%- endif -%}

+ 4 - 4
templates/cranefly/usercp/avatar.html

@@ -27,10 +27,10 @@
         {%- endif %}</h1>
       </div>
       <ul class="unstyled">
-        {% if 'gravatar' in settings.avatars_types and user.avatar_type != 'gravatar' %}<li><form action="{% url 'usercp_avatar_gravatar' %}" method="post" class="form-button"><button type="submit" class="btn btn-link"><i class="icon-share"></i> {% trans %}Use Gravatar{% endtrans %}</button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
-        {% if 'gallery' in settings.avatars_types %}<li><a href="{% url 'usercp_avatar_gallery' %}" class="btn btn-link"><i class="icon-th"></i> {% trans %}Pick Avatar from Gallery{% endtrans %}</a></li>{% endif %}
-        {% if user.avatar_type == 'upload' %}<li id="crop-js" style="display: none;"><a href="{% url 'usercp_avatar_crop' %}" class="btn btn-link"><i class="icon-fullscreen"></i> {% trans %}Crop Your Avatar{% endtrans %}</a></li>{% endif %}
-        {% if 'upload' in settings.avatars_types %}<li><a href="{% url 'usercp_avatar_upload' %}" class="btn btn-link"><i class="icon-picture"></i> {% trans %}Upload Avatar{% endtrans %}</a></li>{% endif %}
+        {% if 'gravatar' in settings.avatars_types and user.avatar_type != 'gravatar' %}<li><form action="{{ url('usercp_avatar_gravatar') }}" method="post" class="form-button"><button type="submit" class="btn btn-link"><i class="icon-share"></i> {% trans %}Use Gravatar{% endtrans %}</button><input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}"></form></li>{% endif %}
+        {% if 'gallery' in settings.avatars_types %}<li><a href="{{ url('usercp_avatar_gallery') }}" class="btn btn-link"><i class="icon-th"></i> {% trans %}Pick Avatar from Gallery{% endtrans %}</a></li>{% endif %}
+        {% if user.avatar_type == 'upload' %}<li id="crop-js" style="display: none;"><a href="{{ url('usercp_avatar_crop') }}" class="btn btn-link"><i class="icon-fullscreen"></i> {% trans %}Crop Your Avatar{% endtrans %}</a></li>{% endif %}
+        {% if 'upload' in settings.avatars_types %}<li><a href="{{ url('usercp_avatar_upload') }}" class="btn btn-link"><i class="icon-picture"></i> {% trans %}Upload Avatar{% endtrans %}</a></li>{% endif %}
       </ul>
     </div>
   </div>

+ 2 - 2
templates/cranefly/usercp/avatar_crop.html

@@ -7,14 +7,14 @@
 {% block action %}
 <div class="form-container usercp-avatar-crop">
 
-  <form action="{% if after_upload %}{% url 'usercp_avatar_upload_crop' %}{% else %}{% url 'usercp_avatar_crop' %}{% endif %}" method="post">
+  <form action="{% if after_upload %}{{ url('usercp_avatar_upload_crop') }}{% else %}{{ url('usercp_avatar_crop') }}{% endif %}" method="post">
 
     <div class="form-header">
       <div class="avatar-crop-preview">
         <img src="{{ MEDIA_URL }}{{ source }}" id="preview" alt="{% trans %}Avatar Preview{% endtrans %}" class="jcrop-preview" />
       </div>
       <h1>{% trans %}Crop Avatar{% endtrans %} <small>{% trans %}Change your Avatar{% endtrans %}</small></h1>
-      <a href="{% url 'usercp_avatar' %}" class="btn btn-inverse pull-right">{% trans %}Cancel{% endtrans %}</a>
+      <a href="{{ url('usercp_avatar') }}" class="btn btn-inverse pull-right">{% trans %}Cancel{% endtrans %}</a>
       <button name="save" type="submit" class="btn btn-danger pull-right">{% trans %}Crop Avatar{% endtrans %}</button>
     </div>
 

+ 1 - 1
templates/cranefly/usercp/avatar_gallery.html

@@ -21,7 +21,7 @@
     {% if loop.index0 > 0 and gallery.avatars %}<hr>{% endif %}
     <div class="usercp-avatar-gallery">
       {% for avatar in gallery.avatars %}
-      <form action="{% url 'usercp_avatar_gallery' %}" class="usercp-avatar-select-form" method="post">
+      <form action="{{ url('usercp_avatar_gallery') }}" class="usercp-avatar-select-form" method="post">
         <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
         <input type="hidden" name="avatar_image" value="{{ avatar }}">
         <button type="submit" class="btn btn-link usercp-btn-avatar">

+ 2 - 2
templates/cranefly/usercp/avatar_upload.html

@@ -17,12 +17,12 @@
   </div>
   {% endif %}
 
-  <form action="{% url 'usercp_avatar_upload' %}" method="post" enctype="multipart/form-data">
+  <form action="{{ url('usercp_avatar_upload') }}" method="post" enctype="multipart/form-data">
     <input type="hidden" id="js_check" name="js_check" value="0">
     {{ form_theme.form_widget(form, width=9) }}
     <div class="form-actions">
       <button name="save" type="submit" class="btn btn-primary">{% trans %}Upload Avatar{% endtrans %}</button>
-      <a href="{% url 'usercp_avatar' %}" class="btn">{% trans %}Cancel{% endtrans %}</a>
+      <a href="{{ url('usercp_avatar') }}" class="btn">{% trans %}Cancel{% endtrans %}</a>
     </div>
   </form>
   

+ 1 - 1
templates/cranefly/usercp/credentials.html

@@ -17,7 +17,7 @@
   </div>
   {% endif %}
 
-  <form action="{% url 'usercp_credentials' %}" method="post">
+  <form action="{{ url('usercp_credentials') }}" method="post">
     <div class="form-fields">
       {{ form_theme.form_widget(form, width=9) }}
     </div>

+ 1 - 1
templates/cranefly/usercp/layout.html

@@ -7,7 +7,7 @@
     <ul class="nav nav-pills usercp-tabs">
       <li class="nav-header">{% trans %}Your Control Panel{% endtrans %}</li>
       {% for link in tabs %}
-      <li{% if link.active %} class="active"{% endif %}><a href="{{ link.route|url }}">{{ link.name }}</a></li>
+      <li{% if link.active %} class="active"{% endif %}><a href="{{ url(link.route) }}">{{ link.name }}</a></li>
       {% endfor %}
     </ul>
 

+ 2 - 2
templates/cranefly/usercp/options.html

@@ -17,13 +17,13 @@
   </div>
   {% endif %}
 
-  <form action="{% url 'usercp_options' %}" method="post">
+  <form action="{{ url('usercp_options') }}" method="post">
     <div class="form-fields">
       {{ form_theme.form_widget(form, width=9) }}
     </div>
     <div class="form-actions">
       <button name="save" type="submit" class="btn btn-primary">{% trans %}Change Options{% endtrans %}</button>
-      <a href="{% url 'usercp' %}" class="btn">{% trans %}Cancel{% endtrans %}</a>
+      <a href="{{ url('usercp') }}" class="btn">{% trans %}Cancel{% endtrans %}</a>
     </div>
   </form>
   

+ 1 - 1
templates/cranefly/usercp/signature.html

@@ -26,7 +26,7 @@
   </div>
   {% endif %}
 
-  <form action="{% url 'usercp_signature' %}" method="post">
+  <form action="{{ url('usercp_signature') }}" method="post">
     <input type="hidden" name="{{ csrf_id }}" value="{{ csrf_token }}">
     {{ editor.editor(form.fields.signature, _('Save Signature'),
       hide_links=(not acl.usercp.allow_signature_links()),

+ 1 - 1
templates/cranefly/usercp/username.html

@@ -17,7 +17,7 @@
   </div>
   {% endif %}
 
-  <form action="{% url 'usercp_username' %}" method="post">
+  <form action="{{ url('usercp_username') }}" method="post">
     <div class="form-fields">
       {% if changes_left == 0 %}
       {% do form.fields['username']['attrs'].update({'disabled': 'disabled'}) %}

+ 13 - 13
templates/cranefly/watched.html

@@ -10,8 +10,8 @@
     <h1>{% trans %}Threads you are watching{% endtrans %}</h1>
 
     <ul class="nav nav-tabs header-tabs">
-      <li class="{% if not new %}active{% endif %}"><a href="{% url 'watched_threads' %}">{% trans %}All Threads{% endtrans %}</a></li>
-      <li class="{% if new %}active{% endif %}"><a href="{% url 'watched_threads_new' %}">{% trans %}Unread Threads{% endtrans %}</a></li>
+      <li class="{% if not new %}active{% endif %}"><a href="{{ url('watched_threads') }}">{% trans %}All Threads{% endtrans %}</a></li>
+      <li class="{% if new %}active{% endif %}"><a href="{{ url('watched_threads_new') }}">{% trans %}Unread Threads{% endtrans %}</a></li>
     </ul>
   </div>
 </div>
@@ -57,7 +57,7 @@
           {% if settings.avatars_on_threads_list %}
           <div class="thread-last-avatar">
             {% if thread.last_poster_id %}
-            <a href="{% url 'user' user=thread.last_poster.pk, username=thread.last_poster.username_slug %}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
+            <a href="{{ url('user', user=thread.last_poster.pk, username=thread.last_poster.username_slug) }}"><img src="{{ thread.last_poster.get_avatar(40) }}" alt=""></a>
             {% else %}
             <img src="{{ macros.avatar_guest(40) }}" alt="" class="user-avatar">
             {% endif %}
@@ -161,7 +161,7 @@ thread
 {%- endmacro %}
 
 {% macro thread_starter(thread) -%}
-{% if thread.start_poster_id %}<a href="{% url 'user' user=thread.start_poster_id, username=thread.start_poster_slug %}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
+{% if thread.start_poster_id %}<a href="{{ url('user', user=thread.start_poster_id, username=thread.start_poster_slug) }}" class="user-link">{{ thread.start_poster_name }}</a>{% else %}{{ thread.start_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro thread_forum(thread) -%}
@@ -169,7 +169,7 @@ thread
 {%- endmacro %}
 
 {% macro thread_reply(thread) -%}
-{% if thread.last_poster_id %}<a href="{% url 'user' user=thread.last_poster_id, username=thread.last_poster_slug %}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
+{% if thread.last_poster_id %}<a href="{{ url('user', user=thread.last_poster_id, username=thread.last_poster_slug) }}" class="user-link">{{ thread.last_poster_name }}</a>{% else %}{{ thread.last_poster_name }}{% endif %}
 {%- endmacro %}
 
 {% macro pager() -%}
@@ -178,13 +178,13 @@ thread
   <ul>
     <li class="count">{{ macros.pager_label(pagination) }}</li>
     {% if new %}
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'watched_threads_new' %}" class="tooltip-top" title="{% trans %}Latest Threads{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'watched_threads_new' page=pagination['prev'] %}{% else %}{% url 'watched_threads_new' %}{% endif %}" class="tooltip-top" title="{% trans %}Newer Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'watched_threads_new' page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('watched_threads_new') }}" class="tooltip-top" title="{% trans %}Latest Threads{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('watched_threads_new', page=pagination['prev']) }}{% else %}{{ url('watched_threads_new') }}{% endif %}" class="tooltip-top" title="{% trans %}Newer Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('watched_threads_new', page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
     {% else %}
-    {%- if pagination['prev'] > 1 %}<li><a href="{% url 'watched_threads' %}" class="tooltip-top" title="{% trans %}Latest Threads{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
-    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{% url 'watched_threads' page=pagination['prev'] %}{% else %}{% url 'watched_threads' %}{% endif %}" class="tooltip-top" title="{% trans %}Newer Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
-    {%- if pagination['next'] > 0 %}<li><a href="{% url 'watched_threads' page=pagination['next'] %}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
+    {%- if pagination['prev'] > 1 %}<li><a href="{{ url('watched_threads') }}" class="tooltip-top" title="{% trans %}Latest Threads{% endtrans %}"><i class="icon-chevron-left"></i> {% trans %}Latest{% endtrans %}</a></li>{% endif -%}
+    {%- if pagination['prev'] > 0 %}<li><a href="{%- if pagination['prev'] > 1 %}{{ url('watched_threads', page=pagination['prev']) }}{% else %}{{ url('watched_threads') }}{% endif %}" class="tooltip-top" title="{% trans %}Newer Threads{% endtrans %}"><i class="icon-chevron-left"></i></a></li>{% endif -%}
+    {%- if pagination['next'] > 0 %}<li><a href="{{ url('watched_threads', page=pagination['next']) }}" class="tooltip-top" title="{% trans %}Older Threads{% endtrans %}"><i class="icon-chevron-right"></i></a></li>{% endif -%}
     {% endif %}
   </ul>
 </div>
@@ -197,9 +197,9 @@ thread
 {%- else -%}
   {%- if loop.first and loop.last -%}
     {%- if new -%}
-      {%- if pagination['prev'] > 1 %}{% url 'watched_threads_new' page=pagination['prev'] %}{% else %}{% url 'watched_threads_new' %}{% endif %}
+      {%- if pagination['prev'] > 1 %}{{ url('watched_threads_new', page=pagination['prev']) }}{% else %}{{ url('watched_threads_new') }}{% endif %}
     {%- else -%}
-      {%- if pagination['prev'] > 1 %}{% url 'watched_threads' page=pagination['prev'] %}{% else %}{% url 'watched_threads' %}{% endif %}
+      {%- if pagination['prev'] > 1 %}{{ url('watched_threads', page=pagination['prev']) }}{% else %}{{ url('watched_threads') }}{% endif %}
     {%- endif -%}#watch-{{ settings.threads_per_page }}
   {%- else -%}
     {{ request_path }}#watch-{{ loop.index }}