Browse Source

Template cleanup

Rafał Pitoń 10 years ago
parent
commit
13934b4bc0
69 changed files with 134 additions and 126 deletions
  1. 3 3
      misago/templates/misago/admin/forumroles/form.html
  2. 1 1
      misago/templates/misago/admin/forumroles/forumroles.html
  3. 1 1
      misago/templates/misago/admin/forumroles/list.html
  4. 1 1
      misago/templates/misago/admin/forumroles/roleforums.html
  5. 3 3
      misago/templates/misago/admin/forums/form.html
  6. 1 1
      misago/templates/misago/admin/forums/list.html
  7. 3 3
      misago/templates/misago/admin/labels/form.html
  8. 1 1
      misago/templates/misago/admin/labels/list.html
  9. 1 1
      misago/templates/misago/admin/navbar.html
  10. 3 3
      misago/templates/misago/admin/ranks/form.html
  11. 1 1
      misago/templates/misago/admin/ranks/list.html
  12. 3 3
      misago/templates/misago/admin/roles/form.html
  13. 1 1
      misago/templates/misago/admin/roles/list.html
  14. 1 1
      misago/templates/misago/admin/users/ban_users.html
  15. 3 3
      misago/templates/misago/admin/users/edit.html
  16. 2 2
      misago/templates/misago/admin/users/list.html
  17. 3 3
      misago/templates/misago/admin/warnings/form.html
  18. 1 1
      misago/templates/misago/admin/warnings/list.html
  19. 1 1
      misago/templates/misago/emails/activation/by_admin.html
  20. 1 1
      misago/templates/misago/emails/activation/by_admin.txt
  21. 1 1
      misago/templates/misago/emails/activation/by_user.html
  22. 1 1
      misago/templates/misago/emails/activation/by_user.txt
  23. 1 1
      misago/templates/misago/emails/change_email_password.html
  24. 1 1
      misago/templates/misago/emails/change_email_password.txt
  25. 1 1
      misago/templates/misago/emails/change_password_form_link.html
  26. 1 1
      misago/templates/misago/emails/change_password_form_link.txt
  27. 1 1
      misago/templates/misago/emails/register/complete.html
  28. 1 1
      misago/templates/misago/emails/register/complete.txt
  29. 1 1
      misago/templates/misago/emails/register/inactive.txt
  30. 2 2
      misago/templates/misago/forgottenpassword/reset_password_form.html
  31. 1 1
      misago/templates/misago/forums/categories.html
  32. 3 3
      misago/templates/misago/forums/category.html
  33. 2 2
      misago/templates/misago/forums/forums.html
  34. 1 1
      misago/templates/misago/modusers/avatar.html
  35. 2 2
      misago/templates/misago/modusers/ban.html
  36. 1 1
      misago/templates/misago/modusers/base.html
  37. 2 2
      misago/templates/misago/modusers/rename.html
  38. 2 2
      misago/templates/misago/modusers/signature.html
  39. 3 3
      misago/templates/misago/modusers/warn.html
  40. 3 3
      misago/templates/misago/posting/form.html
  41. 2 2
      misago/templates/misago/profile/ban_details.html
  42. 2 2
      misago/templates/misago/profile/base.html
  43. 4 4
      misago/templates/misago/profile/followers.html
  44. 4 4
      misago/templates/misago/profile/follows.html
  45. 1 1
      misago/templates/misago/profile/header.html
  46. 5 5
      misago/templates/misago/profile/name_history.html
  47. 2 2
      misago/templates/misago/profile/posts.html
  48. 2 2
      misago/templates/misago/profile/threads.html
  49. 4 4
      misago/templates/misago/profile/warnings.html
  50. 1 1
      misago/templates/misago/ranks_online.html
  51. 2 2
      misago/templates/misago/register/completed.html
  52. 2 2
      misago/templates/misago/thread/full_path.html
  53. 1 1
      misago/templates/misago/thread/post.html
  54. 3 3
      misago/templates/misago/thread/replies.html
  55. 3 2
      misago/templates/misago/threads/base.html
  56. 3 3
      misago/templates/misago/threads/forum.html
  57. 3 3
      misago/templates/misago/threads/merge.html
  58. 3 3
      misago/templates/misago/threads/merge/full.html
  59. 3 3
      misago/templates/misago/threads/move.html
  60. 3 3
      misago/templates/misago/threads/move/full.html
  61. 1 1
      misago/templates/misago/user_nav.html
  62. 1 1
      misago/templates/misago/users_cards.html
  63. 1 1
      misago/templates/misago/userslists/active_posters.html
  64. 1 1
      misago/templates/misago/userslists/base.html
  65. 2 2
      misago/templates/misago/userslists/online.html
  66. 1 1
      misago/templates/misago/userslists/rank.html
  67. 0 0
      misago/threads/tests/test_thread_view.py
  68. 5 1
      misago/threads/views/generic/thread/threadactions.py
  69. 3 0
      misago/users/models/warnings.py

+ 3 - 3
misago/templates/misago/admin/forumroles/form.html

@@ -4,7 +4,7 @@
 
 
 {% block title %}
 {% block title %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New role" %}
 {% trans "New role" %}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
@@ -13,7 +13,7 @@
 
 
 {% block page-target %}
 {% block page-target %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New role" %}
 {% trans "New role" %}
 {% endif %}
 {% endif %}
@@ -23,7 +23,7 @@
 {% block form-header %}
 {% block form-header %}
 <h1>
 <h1>
   {% if target.pk %}
   {% if target.pk %}
-  {{ target.name }}
+  {{ target }}
   {% else %}
   {% else %}
   {% trans "New role" %}
   {% trans "New role" %}
   {% endif %}
   {% endif %}

+ 1 - 1
misago/templates/misago/admin/forumroles/forumroles.html

@@ -33,7 +33,7 @@
       {% for form in forms %}
       {% for form in forms %}
       <tr>
       <tr>
         <td class="item-name">
         <td class="item-name">
-          {{ form.role.name }}
+          {{ form.role }}
         </td>
         </td>
         <td>
         <td>
           {% crispy_field form.forum_role %}
           {% crispy_field form.forum_role %}

+ 1 - 1
misago/templates/misago/admin/forumroles/list.html

@@ -21,7 +21,7 @@
 
 
 {% block table-row %}
 {% block table-row %}
 <td class="item-name">
 <td class="item-name">
-  {{ item.name }}
+  {{ item }}
 </td>
 </td>
 <td class="row-action">
 <td class="row-action">
   <a href="{% url 'misago:admin:permissions:forums:edit' role_id=item.id %}" class="btn btn-primary tooltip-top" title="{% trans "Edit" %}">
   <a href="{% url 'misago:admin:permissions:forums:edit' role_id=item.id %}" class="btn btn-primary tooltip-top" title="{% trans "Edit" %}">

+ 1 - 1
misago/templates/misago/admin/forumroles/roleforums.html

@@ -43,7 +43,7 @@
           {% elif form.forum.role == 'redirect' %}
           {% elif form.forum.role == 'redirect' %}
           <span class="fa fa-link tooltip-top" title="{% trans "Redirect" %}"></span>
           <span class="fa fa-link tooltip-top" title="{% trans "Redirect" %}"></span>
           {% endif %}
           {% endif %}
-          {{ form.forum.name }}
+          {{ form.forum }}
         </td>
         </td>
         <td>
         <td>
           {% crispy_field form.role %}
           {% crispy_field form.role %}

+ 3 - 3
misago/templates/misago/admin/forums/form.html

@@ -4,7 +4,7 @@
 
 
 {% block title %}
 {% block title %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New forum" %}
 {% trans "New forum" %}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
@@ -13,7 +13,7 @@
 
 
 {% block page-target %}
 {% block page-target %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New forum" %}
 {% trans "New forum" %}
 {% endif %}
 {% endif %}
@@ -23,7 +23,7 @@
 {% block form-header %}
 {% block form-header %}
 <h1>
 <h1>
   {% if target.pk %}
   {% if target.pk %}
-  {{ target.name }}
+  {{ target }}
   {% else %}
   {% else %}
   {% trans "New forum" %}
   {% trans "New forum" %}
   {% endif %}
   {% endif %}

+ 1 - 1
misago/templates/misago/admin/forums/list.html

@@ -36,7 +36,7 @@
   {% elif item.role == 'redirect' %}
   {% elif item.role == 'redirect' %}
   <span class="fa fa-link tooltip-top" title="{% trans "Redirect" %}"></span>
   <span class="fa fa-link tooltip-top" title="{% trans "Redirect" %}"></span>
   {% endif %}
   {% endif %}
-  {{ item.name }}
+  {{ item }}
 </td>
 </td>
 <td class="row-action">
 <td class="row-action">
   {% if not item.last %}
   {% if not item.last %}

+ 3 - 3
misago/templates/misago/admin/labels/form.html

@@ -4,7 +4,7 @@
 
 
 {% block title %}
 {% block title %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New label" %}
 {% trans "New label" %}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
@@ -13,7 +13,7 @@
 
 
 {% block page-target %}
 {% block page-target %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New label" %}
 {% trans "New label" %}
 {% endif %}
 {% endif %}
@@ -23,7 +23,7 @@
 {% block form-header %}
 {% block form-header %}
 <h1>
 <h1>
   {% if target.pk %}
   {% if target.pk %}
-  {{ target.name }}
+  {{ target }}
   {% else %}
   {% else %}
   {% trans "New label" %}
   {% trans "New label" %}
   {% endif %}
   {% endif %}

+ 1 - 1
misago/templates/misago/admin/labels/list.html

@@ -25,7 +25,7 @@
 
 
 {% block table-row %}
 {% block table-row %}
 <td class="item-name">
 <td class="item-name">
-  {{ item.name }}
+  {{ item }}
 </td>
 </td>
 <td>{% if item.css_class %}{{ item.css_class }}{% else %}&nbsp;{% endif %}</td>
 <td>{% if item.css_class %}{{ item.css_class }}{% else %}&nbsp;{% endif %}</td>
 {% for action in extra_actions %}
 {% for action in extra_actions %}

+ 1 - 1
misago/templates/misago/admin/navbar.html

@@ -17,7 +17,7 @@
         <p class="navbar-text">
         <p class="navbar-text">
           <a href="{% url 'misago:admin:users:accounts:edit' user_id=user.id %}" class="tooltip-bottom" title="{% trans "Edit your account" %}">
           <a href="{% url 'misago:admin:users:accounts:edit' user_id=user.id %}" class="tooltip-bottom" title="{% trans "Edit your account" %}">
             <img src="{{ user|avatar:30 }}" alt="{% trans "Your avatar" %}">
             <img src="{{ user|avatar:30 }}" alt="{% trans "Your avatar" %}">
-            {{ user.username }}
+            {{ user }}
           </a>
           </a>
           <a href="#" class="logout" data-toggle="modal" data-target="#logout-modal">
           <a href="#" class="logout" data-toggle="modal" data-target="#logout-modal">
             <span class="fa fa-power-off"></span>
             <span class="fa fa-power-off"></span>

+ 3 - 3
misago/templates/misago/admin/ranks/form.html

@@ -4,7 +4,7 @@
 
 
 {% block title %}
 {% block title %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New rank" %}
 {% trans "New rank" %}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
@@ -13,7 +13,7 @@
 
 
 {% block page-target %}
 {% block page-target %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New rank" %}
 {% trans "New rank" %}
 {% endif %}
 {% endif %}
@@ -23,7 +23,7 @@
 {% block form-header %}
 {% block form-header %}
 <h1>
 <h1>
   {% if target.pk %}
   {% if target.pk %}
-  {{ target.name }}
+  {{ target }}
   {% else %}
   {% else %}
   {% trans "New rank" %}
   {% trans "New rank" %}
   {% endif %}
   {% endif %}

+ 1 - 1
misago/templates/misago/admin/ranks/list.html

@@ -30,7 +30,7 @@
 
 
 {% block table-row %}
 {% block table-row %}
 <td class="item-name">
 <td class="item-name">
-  {{ item.name }}
+  {{ item }}
 </td>
 </td>
 <td>
 <td>
   {% if item.title %}
   {% if item.title %}

+ 3 - 3
misago/templates/misago/admin/roles/form.html

@@ -4,7 +4,7 @@
 
 
 {% block title %}
 {% block title %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New role" %}
 {% trans "New role" %}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
@@ -13,7 +13,7 @@
 
 
 {% block page-target %}
 {% block page-target %}
 {% if target.pk %}
 {% if target.pk %}
-{{ target.name }}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New role" %}
 {% trans "New role" %}
 {% endif %}
 {% endif %}
@@ -23,7 +23,7 @@
 {% block form-header %}
 {% block form-header %}
 <h1>
 <h1>
   {% if target.pk %}
   {% if target.pk %}
-  {{ target.name }}
+  {{ target }}
   {% else %}
   {% else %}
   {% trans "New role" %}
   {% trans "New role" %}
   {% endif %}
   {% endif %}

+ 1 - 1
misago/templates/misago/admin/roles/list.html

@@ -25,7 +25,7 @@
 
 
 {% block table-row %}
 {% block table-row %}
 <td class="item-name">
 <td class="item-name">
-  {{ item.name }}
+  {{ item }}
 </td>
 </td>
 {% for action in extra_actions %}
 {% for action in extra_actions %}
 <td class="row-action">
 <td class="row-action">

+ 1 - 1
misago/templates/misago/admin/users/ban_users.html

@@ -18,7 +18,7 @@
 </h1>
 </h1>
 <p>
 <p>
   {% for user in users %}
   {% for user in users %}
-  <img src="{{ user|avatar:24 }}" class="img-rounded tooltip-top" alt="{{ user.username }}" width="24" height="24" title="{{ user.username }}">
+  <img src="{{ user|avatar:24 }}" class="img-rounded tooltip-top" alt="{{ user }}" width="24" height="24" title="{{ user }}">
   {% endfor %}
   {% endfor %}
 </p>
 </p>
 {% endblock %}
 {% endblock %}

+ 3 - 3
misago/templates/misago/admin/users/edit.html

@@ -3,18 +3,18 @@
 
 
 
 
 {% block title %}
 {% block title %}
-{{ target.username }} | {{ active_link.name }} | {{ block.super }}
+{{ target }} | {{ active_link.name }} | {{ block.super }}
 {% endblock title %}
 {% endblock title %}
 
 
 
 
 {% block page-target %}
 {% block page-target %}
-{{ target.username }}
+{{ target }}
 {% endblock page-target %}
 {% endblock page-target %}
 
 
 
 
 {% block form-header %}
 {% block form-header %}
 <h1>
 <h1>
-  {{ target.username }}
+  {{ target }}
 </h1>
 </h1>
 {% endblock %}
 {% endblock %}
 
 

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

@@ -35,7 +35,7 @@
   </a>
   </a>
 </td>
 </td>
 <td class="item-name {% if item.requires_activation %}text-muted{% endif %}">
 <td class="item-name {% if item.requires_activation %}text-muted{% endif %}">
-  <a href="{{ item.get_absolute_url }}">{{ item.username }}</a>
+  <a href="{{ item.get_absolute_url }}">{{ item }}</a>
 </td>
 </td>
 <td class="lead text-muted">
 <td class="lead text-muted">
   {% if item.requires_activation_by_admin %}
   {% if item.requires_activation_by_admin %}
@@ -59,7 +59,7 @@
   <a href="mailto:{{ item.email }}">{{ item.email }}</a>
   <a href="mailto:{{ item.email }}">{{ item.email }}</a>
 </td>
 </td>
 <td>
 <td>
-  {{ item.rank.name }}
+  {{ item.rank }}
 </td>
 </td>
 <td>
 <td>
   <abbr class="tooltip-top dynamic time-ago" title="{{ item.joined_on }}" data-timestamp="{{ item.joined_on|date:"c" }}">
   <abbr class="tooltip-top dynamic time-ago" title="{{ item.joined_on }}" data-timestamp="{{ item.joined_on|date:"c" }}">

+ 3 - 3
misago/templates/misago/admin/warnings/form.html

@@ -4,7 +4,7 @@
 
 
 {% block title %}
 {% block title %}
 {% if target.pk %}
 {% if target.pk %}
-{% trans target.name %}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New warning level" %}
 {% trans "New warning level" %}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
 {% endif %} | {{ active_link.name }} | {{ block.super }}
@@ -13,7 +13,7 @@
 
 
 {% block page-target %}
 {% block page-target %}
 {% if target.pk %}
 {% if target.pk %}
-{% trans target.name %}
+{{ target }}
 {% else %}
 {% else %}
 {% trans "New warning level" %}
 {% trans "New warning level" %}
 {% endif %}
 {% endif %}
@@ -23,7 +23,7 @@
 {% block form-header %}
 {% block form-header %}
 <h1>
 <h1>
   {% if target.pk %}
   {% if target.pk %}
-  {% trans target.name %}
+  {{ target }}
   {% else %}
   {% else %}
   {% trans "New warning level" %}
   {% trans "New warning level" %}
   {% endif %}
   {% endif %}

+ 1 - 1
misago/templates/misago/admin/warnings/list.html

@@ -29,7 +29,7 @@
 
 
 {% block table-row %}
 {% block table-row %}
 <td class="item-name">
 <td class="item-name">
-  #{{ forloop.counter }} {{ item.name }}
+  #{{ forloop.counter }} {{ item }}
 </td>
 </td>
 <td>{{ item.length }}</td>
 <td>{{ item.length }}</td>
 <td>
 <td>

+ 1 - 1
misago/templates/misago/emails/activation/by_admin.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, your account has been activated by forum administrator.
 {{ user }}, your account has been activated by forum administrator.
 {% endblocktrans %}
 {% endblocktrans %}
 <br>
 <br>

+ 1 - 1
misago/templates/misago/emails/activation/by_admin.txt

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, your account has been activated by forum administrator.
 {{ user }}, your account has been activated by forum administrator.
 {% endblocktrans %}
 {% endblocktrans %}
 
 

+ 1 - 1
misago/templates/misago/emails/activation/by_user.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, to activate your account click the below link:
 {{ user }}, to activate your account click the below link:
 {% endblocktrans %}
 {% endblocktrans %}
 <br>
 <br>

+ 1 - 1
misago/templates/misago/emails/activation/by_user.txt

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, to activate your account click the below link:
 {{ user }}, to activate your account click the below link:
 {% endblocktrans %}
 {% endblocktrans %}
 {{ SITE_ADDRESS }}{% url 'misago:activate_by_token' user_id=recipient.id token=activation_token %}"
 {{ SITE_ADDRESS }}{% url 'misago:activate_by_token' user_id=recipient.id token=activation_token %}"

+ 1 - 1
misago/templates/misago/emails/change_email_password.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, you are receiving this message because you have made changes in your account email and password.
 {{ user }}, you are receiving this message because you have made changes in your account email and password.
 {% endblocktrans %}
 {% endblocktrans %}
 <br>
 <br>

+ 1 - 1
misago/templates/misago/emails/change_email_password.txt

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, you are receiving this message because you have made changes in your account email and password.
 {{ user }}, you are receiving this message because you have made changes in your account email and password.
 {% endblocktrans %}
 {% endblocktrans %}
 
 

+ 1 - 1
misago/templates/misago/emails/change_password_form_link.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, you are receiving this message because you want to change forgotten password for your forum account.
 {{ user }}, you are receiving this message because you want to change forgotten password for your forum account.
 {% endblocktrans %}
 {% endblocktrans %}
 <br>
 <br>

+ 1 - 1
misago/templates/misago/emails/change_password_form_link.txt

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, you are receiving this message because you want to change forgotten password for your forum account.
 {{ user }}, you are receiving this message because you want to change forgotten password for your forum account.
 {% endblocktrans %}
 {% endblocktrans %}
 
 

+ 1 - 1
misago/templates/misago/emails/register/complete.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, thank you for joining us!
 {{ user }}, thank you for joining us!
 {% endblocktrans %}
 {% endblocktrans %}
 <br>
 <br>

+ 1 - 1
misago/templates/misago/emails/register/complete.txt

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, thank you for joining us!
 {{ user }}, thank you for joining us!
 {% endblocktrans %}
 {% endblocktrans %}
 
 

+ 1 - 1
misago/templates/misago/emails/register/inactive.txt

@@ -3,7 +3,7 @@
 
 
 
 
 {% block content %}
 {% block content %}
-{% blocktrans trimmed with user=recipient.username %}
+{% blocktrans trimmed with user=recipient %}
 {{ user }}, thank you for joining us!
 {{ user }}, thank you for joining us!
 {% endblocktrans %}
 {% endblocktrans %}
 {% if activation_by_admin %}
 {% if activation_by_admin %}

+ 2 - 2
misago/templates/misago/forgottenpassword/reset_password_form.html

@@ -2,7 +2,7 @@
 {% load i18n %}
 {% load i18n %}
 
 
 
 
-{% block title %}{% blocktrans trimmed with user=requesting_user.username %}
+{% block title %}{% blocktrans trimmed with user=requesting_user %}
 Set new password for {{ user }}
 Set new password for {{ user }}
 {% endblocktrans %} | {{ block.super }}{% endblock %}
 {% endblocktrans %} | {{ block.super }}{% endblock %}
 
 
@@ -12,7 +12,7 @@ Set new password for {{ user }}
   <div class="container">
   <div class="container">
     <h1>
     <h1>
       <span class="fa fa-key">
       <span class="fa fa-key">
-      {% blocktrans trimmed with user=requesting_user.username %}
+      {% blocktrans trimmed with user=requesting_user %}
       Set new password for {{ user }}
       Set new password for {{ user }}
       {% endblocktrans %}
       {% endblocktrans %}
     </h1>
     </h1>

+ 1 - 1
misago/templates/misago/forums/categories.html

@@ -4,7 +4,7 @@
   {% if category.subforums %}
   {% if category.subforums %}
   <div id="{{ category.slug }}-{{ category.pk }}" class="panel panel-default panel-shadow panel-forums {{ category.css_class }}">
   <div id="{{ category.slug }}-{{ category.pk }}" class="panel panel-default panel-shadow panel-forums {{ category.css_class }}">
     <div class="panel-heading">
     <div class="panel-heading">
-      <h3 class="panel-title">{{ category.name }}</h3>
+      <h3 class="panel-title">{{ category }}</h3>
     </div>
     </div>
     {% include "misago/forums/forums.html" with forums=category.subforums %}
     {% include "misago/forums/forums.html" with forums=category.subforums %}
   </div>
   </div>

+ 3 - 3
misago/templates/misago/forums/category.html

@@ -2,7 +2,7 @@
 {% load i18n misago_stringutils %}
 {% load i18n misago_stringutils %}
 
 
 
 
-{% block title %}{{ category.name }} | {{ block.super }}{% endblock title %}
+{% block title %}{{ category }} | {{ block.super }}{% endblock title %}
 
 
 
 
 {% block meta-description %}{{ category.description|striplinebreaks }}{% endblock meta-description %}
 {% block meta-description %}{{ category.description|striplinebreaks }}{% endblock meta-description %}
@@ -16,13 +16,13 @@
       <ol class="breadcrumb">
       <ol class="breadcrumb">
         {% for crumb in path|slice:":-1" %}
         {% for crumb in path|slice:":-1" %}
         <li>
         <li>
-          <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
+          <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
         </li>
         </li>
         {% endfor %}
         {% endfor %}
       </ol>
       </ol>
       {% endif %}
       {% endif %}
 
 
-      <h1>{{ category.name }}</h1>
+      <h1>{{ category }}</h1>
     </div>
     </div>
   </div>
   </div>
   <div class="container">
   <div class="container">

+ 2 - 2
misago/templates/misago/forums/forums.html

@@ -8,7 +8,7 @@
     <span class="forum-icon fa fa-comment{% if forum.is_read %}-o{% else %} new{% endif %} fa-fw tooltip-top" title="{% if forum.is_read %}{% trans "Forum has no new posts." %}{% else %}{% trans "Forum has new posts." %}{% endif %}"></span>
     <span class="forum-icon fa fa-comment{% if forum.is_read %}-o{% else %} new{% endif %} fa-fw tooltip-top" title="{% if forum.is_read %}{% trans "Forum has no new posts." %}{% else %}{% trans "Forum has new posts." %}{% endif %}"></span>
     {% endif %}
     {% endif %}
 
 
-    <a href="{{ forum.get_absolute_url }}" class="item-title forum-name">{{ forum.name }}</a>
+    <a href="{{ forum.get_absolute_url }}" class="item-title forum-name">{{ forum }}</a>
 
 
     <div class="sr-only forum-description">
     <div class="sr-only forum-description">
       {% if forum.description %}
       {% if forum.description %}
@@ -89,7 +89,7 @@
             {% else %}
             {% else %}
             <span class="forum-icon fa fa-comment{% if subforum.is_read %}-o{% else %} new{% endif %} fa-fw "></span>
             <span class="forum-icon fa fa-comment{% if subforum.is_read %}-o{% else %} new{% endif %} fa-fw "></span>
             {% endif %}
             {% endif %}
-            {{ subforum.name }}
+            {{ subforum }}
           </a>
           </a>
         </li>
         </li>
         {% endfor %}
         {% endfor %}

+ 1 - 1
misago/templates/misago/modusers/avatar.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block title %}
 {% block title %}
-{{ profile.username }}: {% trans "Avatar" %} | {{ block.super }}
+{{ profile }}: {% trans "Avatar" %} | {{ block.super }}
 {% endblock title %}
 {% endblock title %}
 
 
 
 

+ 2 - 2
misago/templates/misago/modusers/ban.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block title %}
 {% block title %}
-{{ profile.username }}: {% trans "Ban user" %} | {{ block.super }}
+{{ profile }}: {% trans "Ban user" %} | {{ block.super }}
 {% endblock title %}
 {% endblock title %}
 
 
 
 
@@ -23,7 +23,7 @@
 
 
         <div class="form-header">
         <div class="form-header">
           <h2>
           <h2>
-            {% blocktrans trimmed with user=profile.username %}
+            {% blocktrans trimmed with user=profile %}
             Ban {{ user }}
             Ban {{ user }}
             {% endblocktrans %}
             {% endblocktrans %}
           </h2>
           </h2>

+ 1 - 1
misago/templates/misago/modusers/base.html

@@ -10,7 +10,7 @@
       <div class="main">
       <div class="main">
         <img src="{{ profile|avatar:20 }}" alt="{% trans "Avatar" %}">
         <img src="{{ profile|avatar:20 }}" alt="{% trans "Avatar" %}">
         <a href="{% url USER_PROFILE_URL user_slug=profile.slug user_id=profile.id %}">
         <a href="{% url USER_PROFILE_URL user_slug=profile.slug user_id=profile.id %}">
-          {{ profile.username }}
+          {{ profile }}
         </a>
         </a>
       </div>
       </div>
       <div class="sub">
       <div class="sub">

+ 2 - 2
misago/templates/misago/modusers/rename.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block title %}
 {% block title %}
-{{ profile.username }}: {% trans "Rename user" %} | {{ block.super }}
+{{ profile }}: {% trans "Rename user" %} | {{ block.super }}
 {% endblock title %}
 {% endblock title %}
 
 
 
 
@@ -23,7 +23,7 @@
 
 
         <div class="form-header">
         <div class="form-header">
           <h2>
           <h2>
-            {% blocktrans trimmed with user=profile.username %}
+            {% blocktrans trimmed with user=profile %}
             Rename {{ user }}
             Rename {{ user }}
             {% endblocktrans %}
             {% endblocktrans %}
           </h2>
           </h2>

+ 2 - 2
misago/templates/misago/modusers/signature.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block title %}
 {% block title %}
-{{ profile.username }}: {% trans "Signature" %} | {{ block.super }}
+{{ profile }}: {% trans "Signature" %} | {{ block.super }}
 {% endblock title %}
 {% endblock title %}
 
 
 
 
@@ -32,7 +32,7 @@
         <div class="form-body form-markup-preview">
         <div class="form-body form-markup-preview">
           {% if not profile.signature %}
           {% if not profile.signature %}
           <p class="lead">
           <p class="lead">
-            {% blocktrans trimmed with user=profile.username %}
+            {% blocktrans trimmed with user=profile %}
             {{ user }} has no signature set.
             {{ user }} has no signature set.
             {% endblocktrans %}
             {% endblocktrans %}
           </p>
           </p>

+ 3 - 3
misago/templates/misago/modusers/warn.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block title %}
 {% block title %}
-{{ profile.username }}: {% trans "Warn" %} | {{ block.super }}
+{{ profile }}: {% trans "Warn" %} | {{ block.super }}
 {% endblock title %}
 {% endblock title %}
 
 
 
 
@@ -64,7 +64,7 @@
       <div class="panel-body thin">
       <div class="panel-body thin">
 
 
         {% if current_level %}
         {% if current_level %}
-          <h4>{{ current_level.name }}</h4>
+          <h4>{{ current_level }}</h4>
 
 
           {% if current_level.is_replying_disallowed %}
           {% if current_level.is_replying_disallowed %}
           <p>
           <p>
@@ -118,7 +118,7 @@
       </div>
       </div>
       <div class="panel-body thin">
       <div class="panel-body thin">
 
 
-        <h4>{{ next_level.name }}</h4>
+        <h4>{{ next_level }}</h4>
 
 
         {% if next_level.is_replying_disallowed %}
         {% if next_level.is_replying_disallowed %}
         <p>
         <p>

+ 3 - 3
misago/templates/misago/posting/form.html

@@ -2,7 +2,7 @@
 {% load i18n %}
 {% load i18n %}
 
 
 
 
-{% block title %}{% trans "Start new thread" %} | {{ forum.name }} | {{ block.super }}{% endblock title %}
+{% block title %}{% trans "Start new thread" %} | {{ forum }} | {{ block.super }}{% endblock title %}
 
 
 
 
 {% block content %}
 {% block content %}
@@ -13,7 +13,7 @@
       <ol class="breadcrumb">
       <ol class="breadcrumb">
         {% for crumb in path %}
         {% for crumb in path %}
         <li>
         <li>
-          <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
+          <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
         </li>
         </li>
         {% endfor %}
         {% endfor %}
       </ol>
       </ol>
@@ -21,7 +21,7 @@
 
 
       <h1>
       <h1>
         <span class="main">
         <span class="main">
-          <a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a>
+          <a href="{{ forum.get_absolute_url }}">{{ forum }}</a>
         </span>
         </span>
         <span class="sub">
         <span class="sub">
           <span class="fa fa-chevron-right"></span>
           <span class="fa fa-chevron-right"></span>

+ 2 - 2
misago/templates/misago/profile/ban_details.html

@@ -7,11 +7,11 @@
   <p class="lead pull-left">
   <p class="lead pull-left">
     <span class="fa fa-lock"></span>
     <span class="fa fa-lock"></span>
     {% if ban.valid_until %}
     {% if ban.valid_until %}
-    {% blocktrans trimmed with user=profile.username banned_until=ban.valid_until %}
+    {% blocktrans trimmed with user=profile banned_until=ban.valid_until %}
     {{ user }} is banned until after {{ banned_until }}.
     {{ user }} is banned until after {{ banned_until }}.
     {% endblocktrans %}
     {% endblocktrans %}
     {% else %}
     {% else %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     {{ user }} is banned permanently.
     {{ user }} is banned permanently.
     {% endblocktrans %}
     {% endblocktrans %}
     {% endif %}
     {% endif %}

+ 2 - 2
misago/templates/misago/profile/base.html

@@ -2,10 +2,10 @@
 {% load i18n %}
 {% load i18n %}
 
 
 
 
-{% block title %}{{ profile.username }}: {{ active_page.name }} {% if page_number > 1 %}({% blocktrans with page=page_number %}Page {{ number }}{% endblocktrans %}) {% endif %}| {{ block.super }}{% endblock title %}
+{% block title %}{{ profile }}: {{ active_page.name }} {% if page_number > 1 %}({% blocktrans with page=page_number %}Page {{ number }}{% endblocktrans %}) {% endif %}| {{ block.super }}{% endblock title %}
 
 
 
 
-{% block meta-description %}{% blocktrans trimmed with user=profile.username joined_on=profile.joined_on|date %}
+{% block meta-description %}{% blocktrans trimmed with user=profile joined_on=profile.joined_on|date %}
 {{ user }} is member since {{ joined_on }}.
 {{ user }} is member since {{ joined_on }}.
 {% endblocktrans %}{% endblock meta-description %}
 {% endblocktrans %}{% endblock meta-description %}
 
 

+ 4 - 4
misago/templates/misago/profile/followers.html

@@ -2,7 +2,7 @@
 {% load humanize i18n misago_avatars misago_pagination %}
 {% load humanize i18n misago_avatars misago_pagination %}
 
 
 
 
-{% block meta-description %}{% blocktrans trimmed with user=profile.username followers=profile.followers|intcomma count counter=profile.followers %}
+{% block meta-description %}{% blocktrans trimmed with user=profile followers=profile.followers|intcomma count counter=profile.followers %}
 {{ user }} is followed by {{ followers }} user.
 {{ user }} is followed by {{ followers }} user.
 {% plural %}
 {% plural %}
 {{ user }} is followed by {{ followers }} users.
 {{ user }} is followed by {{ followers }} users.
@@ -19,7 +19,7 @@
       You are followed by {{ followers }} users.
       You are followed by {{ followers }} users.
       {% endblocktrans %}
       {% endblocktrans %}
     {% else %}
     {% else %}
-      {% blocktrans trimmed with user=profile.username followers=profile.followers|intcomma count counter=profile.followers %}
+      {% blocktrans trimmed with user=profile followers=profile.followers|intcomma count counter=profile.followers %}
       {{ user }} is followed by {{ followers }} user.
       {{ user }} is followed by {{ followers }} user.
       {% plural %}
       {% plural %}
       {{ user }} is followed by {{ followers }} users.
       {{ user }} is followed by {{ followers }} users.
@@ -31,11 +31,11 @@
 {% else %}
 {% else %}
 <p class="lead">
 <p class="lead">
   {% if is_authenticated_user %}
   {% if is_authenticated_user %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     No users are following you, {{ user }}.
     No users are following you, {{ user }}.
     {% endblocktrans %}
     {% endblocktrans %}
   {% else %}
   {% else %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     {{ user }} has no followers.
     {{ user }} has no followers.
     {% endblocktrans %}
     {% endblocktrans %}
   {% endif %}
   {% endif %}

+ 4 - 4
misago/templates/misago/profile/follows.html

@@ -3,7 +3,7 @@
 
 
 
 
 {% block meta-description %}
 {% block meta-description %}
-{% blocktrans trimmed with user=profile.username follows=profile.following|intcomma count counter=profile.following %}
+{% blocktrans trimmed with user=profile follows=profile.following|intcomma count counter=profile.following %}
 {{ user }} is following {{ follows }} user.
 {{ user }} is following {{ follows }} user.
 {% plural %}
 {% plural %}
 {{ user }} is following {{ follows }} users.
 {{ user }} is following {{ follows }} users.
@@ -20,7 +20,7 @@
       You are following {{ follows }} users.
       You are following {{ follows }} users.
       {% endblocktrans %}
       {% endblocktrans %}
     {% else %}
     {% else %}
-      {% blocktrans trimmed with user=profile.username follows=profile.following|intcomma count counter=profile.following %}
+      {% blocktrans trimmed with user=profile follows=profile.following|intcomma count counter=profile.following %}
       {{ user }} is following {{ follows }} user.
       {{ user }} is following {{ follows }} user.
       {% plural %}
       {% plural %}
       {{ user }} is following {{ follows }} users.
       {{ user }} is following {{ follows }} users.
@@ -32,11 +32,11 @@
 {% else %}
 {% else %}
 <p class="lead">
 <p class="lead">
   {% if is_authenticated_user %}
   {% if is_authenticated_user %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     Your are not following any users, {{ user }}.
     Your are not following any users, {{ user }}.
     {% endblocktrans %}
     {% endblocktrans %}
   {% else %}
   {% else %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     {{ user }} follows no users.
     {{ user }} follows no users.
     {% endblocktrans %}
     {% endblocktrans %}
   {% endif %}
   {% endif %}

+ 1 - 1
misago/templates/misago/profile/header.html

@@ -1,6 +1,6 @@
 {% load i18n %}
 {% load i18n %}
 <h1 class="user-name">
 <h1 class="user-name">
-  {{ profile.username }}
+  {{ profile }}
   {% if profile.title or profile.rank.is_tab %}
   {% if profile.title or profile.rank.is_tab %}
   <small class="user-title">
   <small class="user-title">
     {% if profile.rank.is_tab %}
     {% if profile.rank.is_tab %}

+ 5 - 5
misago/templates/misago/profile/name_history.html

@@ -2,7 +2,7 @@
 {% load humanize i18n misago_avatars misago_capture misago_pagination %}
 {% load humanize i18n misago_avatars misago_capture misago_pagination %}
 
 
 
 
-{% block meta-description %}{% blocktrans trimmed with user=profile.username changes=name_changes.paginator.count|intcomma joined_on=profile.joined_on|date count counter=name_changes.paginator.count %}
+{% block meta-description %}{% blocktrans trimmed with user=profile changes=name_changes.paginator.count|intcomma joined_on=profile.joined_on|date count counter=name_changes.paginator.count %}
 {{ user }} username was changed {{ changes }} time since {{ joined_on }}.
 {{ user }} username was changed {{ changes }} time since {{ joined_on }}.
 {% plural %}
 {% plural %}
 {{ user }} username was changed {{ changes }} times since {{ joined_on }}.
 {{ user }} username was changed {{ changes }} times since {{ joined_on }}.
@@ -19,7 +19,7 @@
       Your username was changed {{ changes }} times.
       Your username was changed {{ changes }} times.
       {% endblocktrans %}
       {% endblocktrans %}
     {% else %}
     {% else %}
-      {% blocktrans trimmed with user=profile.username changes=name_changes.paginator.count|intcomma count counter=name_changes.paginator.count %}
+      {% blocktrans trimmed with user=profile changes=name_changes.paginator.count|intcomma count counter=name_changes.paginator.count %}
       {{ user }} username was changed {{ changes }} time.
       {{ user }} username was changed {{ changes }} time.
       {% plural %}
       {% plural %}
       {{ user }} username was changed {{ changes }} times.
       {{ user }} username was changed {{ changes }} times.
@@ -54,7 +54,7 @@
         {{ changed_by }} changed {{ old_username }}'s name to {{ new_username }}
         {{ changed_by }} changed {{ old_username }}'s name to {{ new_username }}
         {% endblocktrans %}
         {% endblocktrans %}
       {% else %}
       {% else %}
-        <img src="{{ profile.pk|avatar:22 }}" class="tooltip-top" title="{{ profile.username }}">
+        <img src="{{ profile.pk|avatar:22 }}" class="tooltip-top" title="{{ profile }}">
         {% blocktrans trimmed with old_username=old_username|safe new_username=new_username|safe %}
         {% blocktrans trimmed with old_username=old_username|safe new_username=new_username|safe %}
         {{ old_username }} changed name to {{ new_username }}
         {{ old_username }} changed name to {{ new_username }}
         {% endblocktrans %}
         {% endblocktrans %}
@@ -71,11 +71,11 @@
 {% else %}
 {% else %}
 <p class="lead">
 <p class="lead">
   {% if is_authenticated_user %}
   {% if is_authenticated_user %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     Your username was never changed, {{ user }}.
     Your username was never changed, {{ user }}.
     {% endblocktrans %}
     {% endblocktrans %}
   {% else %}
   {% else %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     {{ user }}'s username was never changed.
     {{ user }}'s username was never changed.
     {% endblocktrans %}
     {% endblocktrans %}
   {% endif %}
   {% endif %}

+ 2 - 2
misago/templates/misago/profile/posts.html

@@ -2,7 +2,7 @@
 {% load humanize i18n %}
 {% load humanize i18n %}
 
 
 
 
-{% block meta-description %}{% blocktrans trimmed with user=profile.username posts=profile.posts|intcomma joined_on=profile.joined_on|date count counter=profile.posts %}
+{% block meta-description %}{% blocktrans trimmed with user=profile posts=profile.posts|intcomma joined_on=profile.joined_on|date count counter=profile.posts %}
 {{ user }} has posted {{ posts }} message since {{ joined_on }}.
 {{ user }} has posted {{ posts }} message since {{ joined_on }}.
 {% plural %}
 {% plural %}
 {{ user }} has posted {{ posts }} messages since {{ joined_on }}.
 {{ user }} has posted {{ posts }} messages since {{ joined_on }}.
@@ -11,7 +11,7 @@
 
 
 {% block page %}
 {% block page %}
 <p class="lead">
 <p class="lead">
-  {% blocktrans trimmed with user=profile.username %}
+  {% blocktrans trimmed with user=profile %}
   {{ user }} posted no messages, or you can't see them.
   {{ user }} posted no messages, or you can't see them.
   {% endblocktrans %}
   {% endblocktrans %}
 </p>
 </p>

+ 2 - 2
misago/templates/misago/profile/threads.html

@@ -2,7 +2,7 @@
 {% load humanize i18n %}
 {% load humanize i18n %}
 
 
 
 
-{% block meta-description %}{% blocktrans trimmed with user=profile.username threads=profile.threads|intcomma joined_on=profile.joined_on|date count counter=profile.threads %}
+{% block meta-description %}{% blocktrans trimmed with user=profile threads=profile.threads|intcomma joined_on=profile.joined_on|date count counter=profile.threads %}
 {{ user }} has started {{ threads }} thread since {{ joined_on }}.
 {{ user }} has started {{ threads }} thread since {{ joined_on }}.
 {% plural %}
 {% plural %}
 {{ user }} has started {{ threads }} threads since {{ joined_on }}.
 {{ user }} has started {{ threads }} threads since {{ joined_on }}.
@@ -11,7 +11,7 @@
 
 
 {% block page %}
 {% block page %}
 <p class="lead">
 <p class="lead">
-  {% blocktrans trimmed with user=profile.username %}
+  {% blocktrans trimmed with user=profile %}
   {{ user }} started no threads, or you can't see them.
   {{ user }} started no threads, or you can't see them.
   {% endblocktrans %}
   {% endblocktrans %}
 </p>
 </p>

+ 4 - 4
misago/templates/misago/profile/warnings.html

@@ -2,7 +2,7 @@
 {% load humanize i18n misago_avatars misago_capture misago_dates misago_pagination %}
 {% load humanize i18n misago_avatars misago_capture misago_dates misago_pagination %}
 
 
 
 
-{% block meta-description %}{% blocktrans trimmed with user=profile.username warnings=warnings.paginator.count|intcomma joined_on=profile.joined_on|date count counter=warnings.paginator.count %}
+{% block meta-description %}{% blocktrans trimmed with user=profile warnings=warnings.paginator.count|intcomma joined_on=profile.joined_on|date count counter=warnings.paginator.count %}
 {{ user }} was warned {{ warnings }} time since {{ joined_on }}.
 {{ user }} was warned {{ warnings }} time since {{ joined_on }}.
 {% plural %}
 {% plural %}
 {{ user }} was warned {{ warnings }} times since {{ joined_on }}.
 {{ user }} was warned {{ warnings }} times since {{ joined_on }}.
@@ -14,7 +14,7 @@
   <div class="warning-summary">
   <div class="warning-summary">
     {% if warning_level %}
     {% if warning_level %}
       <p class="lead">
       <p class="lead">
-        {{ warning_level.name }}
+        {{ warning_level }}
       </p>
       </p>
 
 
       {% if warning_level.has_restrictions %}
       {% if warning_level.has_restrictions %}
@@ -173,11 +173,11 @@
 {% else %}
 {% else %}
 <p class="lead">
 <p class="lead">
   {% if is_authenticated_user %}
   {% if is_authenticated_user %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     Your have no warnings, {{ user }}.
     Your have no warnings, {{ user }}.
     {% endblocktrans %}
     {% endblocktrans %}
   {% else %}
   {% else %}
-    {% blocktrans trimmed with user=profile.username %}
+    {% blocktrans trimmed with user=profile %}
     {{ user }} has no warnings.
     {{ user }} has no warnings.
     {% endblocktrans %}
     {% endblocktrans %}
   {% endif %}
   {% endif %}

+ 1 - 1
misago/templates/misago/ranks_online.html

@@ -15,7 +15,7 @@
           <span>{{ user.username }}</span>
           <span>{{ user.username }}</span>
           {% if user.title %}
           {% if user.title %}
           <small>{{ user.title }}</small>
           <small>{{ user.title }}</small>
-          {% elif rank.title %}
+          {% elif rank %}
           <small>{{ rank.title }}</small>
           <small>{{ rank.title }}</small>
           {% endif %}
           {% endif %}
         </a>
         </a>

+ 2 - 2
misago/templates/misago/register/completed.html

@@ -20,7 +20,7 @@
 
 
     {% if activation_by_user %}
     {% if activation_by_user %}
     <p class="lead">
     <p class="lead">
-      {% blocktrans trimmed with user=registered_user.username %}
+      {% blocktrans trimmed with user=registered_user %}
       {{ user }}, your account has been created, but you have to activate it before you will be able to sign in.
       {{ user }}, your account has been created, but you have to activate it before you will be able to sign in.
       {% endblocktrans %}
       {% endblocktrans %}
     </p>
     </p>
@@ -31,7 +31,7 @@
     </p>
     </p>
     {% elif activation_by_admin %}
     {% elif activation_by_admin %}
     <p class="lead">
     <p class="lead">
-      {% blocktrans trimmed with user=registered_user.username %}
+      {% blocktrans trimmed with user=registered_user %}
       {{ user }}, your account has been created, but administrator has to activate it before you will be able to sign in.
       {{ user }}, your account has been created, but administrator has to activate it before you will be able to sign in.
       {% endblocktrans %}
       {% endblocktrans %}
     </p>
     </p>

+ 2 - 2
misago/templates/misago/thread/full_path.html

@@ -1,8 +1,8 @@
 {% for crumb in path %}
 {% for crumb in path %}
 <li>
 <li>
-  <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a><span class="fa fa-chevron-right"></span>
+  <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a><span class="fa fa-chevron-right"></span>
 </li>
 </li>
 {% endfor %}
 {% endfor %}
 <li>
 <li>
-  <a href="{{ thread.get_absolute_url }}">{{ thread.title }}</a>
+  <a href="{{ thread.get_absolute_url }}">{{ thread }}</a>
 </li>
 </li>

+ 1 - 1
misago/templates/misago/thread/post.html

@@ -16,7 +16,7 @@
         {% if post.poster %}
         {% if post.poster %}
         {% include "misago/user_state.html" with user=post.poster state=post.poster.online_state %}
         {% include "misago/user_state.html" with user=post.poster state=post.poster.online_state %}
         <a class="user-name" href="{% url USER_PROFILE_URL user_slug=post.poster.slug user_id=post.poster.id %}">
         <a class="user-name" href="{% url USER_PROFILE_URL user_slug=post.poster.slug user_id=post.poster.id %}">
-          {{ post.poster.username }}</a>
+          {{ post.poster }}</a>
         {% else %}
         {% else %}
         <span class="fa fa-power-off fa-fw user-offline tooltip-top" title="{% blocktrans with user=post.poster_name %}{{ user }}'s forum account has been deleted.{% endblocktrans %}"></span>
         <span class="fa fa-power-off fa-fw user-offline tooltip-top" title="{% blocktrans with user=post.poster_name %}{{ user }}'s forum account has been deleted.{% endblocktrans %}"></span>
         <span class="user-name">
         <span class="user-name">

+ 3 - 3
misago/templates/misago/thread/replies.html

@@ -2,7 +2,7 @@
 {% load humanize i18n misago_avatars misago_stringutils %}
 {% load humanize i18n misago_avatars misago_stringutils %}
 
 
 
 
-{% block title %}{{ thread.title }}{% if page.number > 1 %} ({% blocktrans with page=page.number %}Page {{ page }}{% endblocktrans %}){% endif %} | {{ block.super }}{% endblock title %}
+{% block title %}{{ thread }}{% if page.number > 1 %} ({% blocktrans with page=page.number %}Page {{ page }}{% endblocktrans %}){% endif %} | {{ block.super }}{% endblock title %}
 
 
 
 
 {% block meta-description %}{% if thread.first_post.is_valid %}{{ thread.first_post.short|striplinebreaks }} {% endif %}{% blocktrans trimmed with replies=thread.replies started=thread.started_on|date last_post=thread.last_post_on|date count counter=thread.replies %}
 {% block meta-description %}{% if thread.first_post.is_valid %}{{ thread.first_post.short|striplinebreaks }} {% endif %}{% blocktrans trimmed with replies=thread.replies started=thread.started_on|date last_post=thread.last_post_on|date count counter=thread.replies %}
@@ -21,13 +21,13 @@
       <ol class="breadcrumb">
       <ol class="breadcrumb">
         {% for crumb in path %}
         {% for crumb in path %}
         <li>
         <li>
-          <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
+          <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
         </li>
         </li>
         {% endfor %}
         {% endfor %}
       </ol>
       </ol>
       {% endif %}
       {% endif %}
 
 
-      <h1>{{ thread.title }}</h1>
+      <h1>{{ thread }}</h1>
 
 
       <ul class="list-inline page-details">
       <ul class="list-inline page-details">
         <li class="tooltip-bottom" title="{% trans "Thread autor" %}">
         <li class="tooltip-bottom" title="{% trans "Thread autor" %}">

+ 3 - 2
misago/templates/misago/threads/base.html

@@ -1,6 +1,7 @@
 {% extends "misago/base.html" %}
 {% extends "misago/base.html" %}
 {% load humanize i18n misago_avatars misago_dates misago_shorthands %}
 {% load humanize i18n misago_avatars misago_dates misago_shorthands %}
 
 
+
 {% block content %}
 {% block content %}
 <div class="container">
 <div class="container">
   {% block threads-list %}
   {% block threads-list %}
@@ -29,7 +30,7 @@
               {% endif %}
               {% endif %}
 
 
               <a href="{{ thread.get_absolute_url }}" class="item-title">
               <a href="{{ thread.get_absolute_url }}" class="item-title">
-                {{ thread.title }}
+                {{ thread }}
               </a>
               </a>
 
 
             </div>
             </div>
@@ -120,7 +121,7 @@
                 {% if thread.label %}
                 {% if thread.label %}
                 <li>
                 <li>
                   <span class="label label-solo label-{{ thread.label.css_class|default:"default" }}">
                   <span class="label label-solo label-{{ thread.label.css_class|default:"default" }}">
-                    {{ thread.label.name }}
+                    {{ thread.label }}
                   </span>
                   </span>
                 </li>
                 </li>
                 {% endif %}
                 {% endif %}

+ 3 - 3
misago/templates/misago/threads/forum.html

@@ -2,7 +2,7 @@
 {% load i18n misago_stringutils %}
 {% load i18n misago_stringutils %}
 
 
 
 
-{% block title %}{{ forum.name }}{% if page.number > 1 %} ({% blocktrans with page=page.number %}Page {{ page }}{% endblocktrans %}){% endif %} | {{ block.super }}{% endblock title %}
+{% block title %}{{ forum }}{% if page.number > 1 %} ({% blocktrans with page=page.number %}Page {{ page }}{% endblocktrans %}){% endif %} | {{ block.super }}{% endblock title %}
 
 
 
 
 {% block meta-description %}{{ forum.description|striplinebreaks }}{% endblock meta-description %}
 {% block meta-description %}{{ forum.description|striplinebreaks }}{% endblock meta-description %}
@@ -16,13 +16,13 @@
       <ol class="breadcrumb">
       <ol class="breadcrumb">
         {% for crumb in path|slice:":-1" %}
         {% for crumb in path|slice:":-1" %}
         <li>
         <li>
-          <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
+          <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a>{% if not forloop.last %}<span class="fa fa-chevron-right"></span>{% endif %}
         </li>
         </li>
         {% endfor %}
         {% endfor %}
       </ol>
       </ol>
       {% endif %}
       {% endif %}
 
 
-      <h1>{{ forum.name }}</h1>
+      <h1>{{ forum }}</h1>
     </div>
     </div>
   </div>
   </div>
   {{ block.super }}
   {{ block.super }}

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

@@ -13,11 +13,11 @@
       <ol class="breadcrumb">
       <ol class="breadcrumb">
         {% for crumb in path|slice:":-1" %}
         {% for crumb in path|slice:":-1" %}
         <li>
         <li>
-          <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a><span class="fa fa-chevron-right"></span>
+          <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a><span class="fa fa-chevron-right"></span>
         </li>
         </li>
         {% endfor %}
         {% endfor %}
         <li>
         <li>
-          <a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a>
+          <a href="{{ forum.get_absolute_url }}">{{ forum }}</a>
         </li>
         </li>
       </ol>
       </ol>
       {% endif %}
       {% endif %}
@@ -41,7 +41,7 @@
 
 
             <div class="form-header">
             <div class="form-header">
               <h2>
               <h2>
-                {% blocktrans trimmed with forum=forum.name %}
+                {% blocktrans trimmed with forum=forum %}
                   Merge threads in {{ forum }}
                   Merge threads in {{ forum }}
                 {% endblocktrans %}
                 {% endblocktrans %}
               </h2>
               </h2>

+ 3 - 3
misago/templates/misago/threads/merge/full.html

@@ -13,11 +13,11 @@
       <ol class="breadcrumb">
       <ol class="breadcrumb">
         {% for crumb in path|slice:":-1" %}
         {% for crumb in path|slice:":-1" %}
         <li>
         <li>
-          <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a><span class="fa fa-chevron-right"></span>
+          <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a><span class="fa fa-chevron-right"></span>
         </li>
         </li>
         {% endfor %}
         {% endfor %}
         <li>
         <li>
-          <a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a>
+          <a href="{{ forum.get_absolute_url }}">{{ forum }}</a>
         </li>
         </li>
       </ol>
       </ol>
       {% endif %}
       {% endif %}
@@ -41,7 +41,7 @@
 
 
             <div class="form-header">
             <div class="form-header">
               <h2>
               <h2>
-                {% blocktrans trimmed with forum=forum.name %}
+                {% blocktrans trimmed with forum=forum %}
                   Merge threads in {{ forum }}
                   Merge threads in {{ forum }}
                 {% endblocktrans %}
                 {% endblocktrans %}
               </h2>
               </h2>

+ 3 - 3
misago/templates/misago/threads/move.html

@@ -13,11 +13,11 @@
       <ol class="breadcrumb">
       <ol class="breadcrumb">
         {% for crumb in path|slice:":-1" %}
         {% for crumb in path|slice:":-1" %}
         <li>
         <li>
-          <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a><span class="fa fa-chevron-right"></span>
+          <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a><span class="fa fa-chevron-right"></span>
         </li>
         </li>
         {% endfor %}
         {% endfor %}
         <li>
         <li>
-          <a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a>
+          <a href="{{ forum.get_absolute_url }}">{{ forum }}</a>
         </li>
         </li>
       </ol>
       </ol>
       {% endif %}
       {% endif %}
@@ -41,7 +41,7 @@
 
 
             <div class="form-header">
             <div class="form-header">
               <h2>
               <h2>
-                {% blocktrans trimmed with forum=forum.name %}
+                {% blocktrans trimmed with forum=forum %}
                   Move threads from {{ forum }}
                   Move threads from {{ forum }}
                 {% endblocktrans %}
                 {% endblocktrans %}
               </h2>
               </h2>

+ 3 - 3
misago/templates/misago/threads/move/full.html

@@ -13,11 +13,11 @@
       <ol class="breadcrumb">
       <ol class="breadcrumb">
         {% for crumb in path|slice:":-1" %}
         {% for crumb in path|slice:":-1" %}
         <li>
         <li>
-          <a href="{{ crumb.get_absolute_url }}">{{ crumb.name }}</a><span class="fa fa-chevron-right"></span>
+          <a href="{{ crumb.get_absolute_url }}">{{ crumb }}</a><span class="fa fa-chevron-right"></span>
         </li>
         </li>
         {% endfor %}
         {% endfor %}
         <li>
         <li>
-          <a href="{{ forum.get_absolute_url }}">{{ forum.name }}</a>
+          <a href="{{ forum.get_absolute_url }}">{{ forum }}</a>
         </li>
         </li>
       </ol>
       </ol>
       {% endif %}
       {% endif %}
@@ -41,7 +41,7 @@
 
 
             <div class="form-header">
             <div class="form-header">
               <h2>
               <h2>
-                {% blocktrans trimmed with forum=forum.name %}
+                {% blocktrans trimmed with forum=forum %}
                   Move threads from {{ forum }}
                   Move threads from {{ forum }}
                 {% endblocktrans %}
                 {% endblocktrans %}
               </h2>
               </h2>

+ 1 - 1
misago/templates/misago/user_nav.html

@@ -4,7 +4,7 @@
     <a href="{% url USER_PROFILE_URL user_slug=user.slug user_id=user.id %}" class="dropdown-toggle user-toggle" data-toggle="dropdown">
     <a href="{% url USER_PROFILE_URL user_slug=user.slug user_id=user.id %}" class="dropdown-toggle user-toggle" data-toggle="dropdown">
       <span class="glyphicon glyphicon-chevron-down"></span>
       <span class="glyphicon glyphicon-chevron-down"></span>
       <img src="{{ user|avatar:30 }}" alt="{% trans "Your avatar" %}">
       <img src="{{ user|avatar:30 }}" alt="{% trans "Your avatar" %}">
-      {{ user.username }}
+      {{ user }}
     </a>
     </a>
     <ul class="dropdown-menu">
     <ul class="dropdown-menu">
       <li>
       <li>

+ 1 - 1
misago/templates/misago/users_cards.html

@@ -9,7 +9,7 @@
       <a href="{% url USER_PROFILE_URL user_slug=card.slug user_id=card.id %}" class="user-card {% if card.rank.css_class %}card-{{ card.rank.css_class }}{% endif %}">
       <a href="{% url USER_PROFILE_URL user_slug=card.slug user_id=card.id %}" class="user-card {% if card.rank.css_class %}card-{{ card.rank.css_class }}{% endif %}">
         <img src="{{ card|avatar:400 }}" alt="{% trans "Avatar" %}">
         <img src="{{ card|avatar:400 }}" alt="{% trans "Avatar" %}">
         <div class="card-footer">
         <div class="card-footer">
-          <h4 class="user-name">{{ card.username }}</h4>
+          <h4 class="user-name">{{ card }}</h4>
         </div>
         </div>
       </a>
       </a>
 
 

+ 1 - 1
misago/templates/misago/userslists/active_posters.html

@@ -36,7 +36,7 @@ List of users that have posted new messages during last {{ days }} days.
           </a>
           </a>
         </td>
         </td>
         <td>
         <td>
-          <a href="{{ user_url }}" class="item-title">{{ ranked.username }}</a>
+          <a href="{{ user_url }}" class="item-title">{{ ranked }}</a>
         </td>
         </td>
         <td class="lead text-center">
         <td class="lead text-center">
           #{{ forloop.counter }}
           #{{ forloop.counter }}

+ 1 - 1
misago/templates/misago/userslists/base.html

@@ -45,7 +45,7 @@
               <img src="{{ card|avatar:400 }}" alt="{% trans "Avatar" %}">
               <img src="{{ card|avatar:400 }}" alt="{% trans "Avatar" %}">
               <div class="card-footer">
               <div class="card-footer">
                 {% block user-card-footer %}
                 {% block user-card-footer %}
-                <h4 class="user-name">{{ card.username }}</h4>
+                <h4 class="user-name">{{ card }}</h4>
                 {% endblock user-card-footer %}
                 {% endblock user-card-footer %}
               </div>
               </div>
             </a>
             </a>

+ 2 - 2
misago/templates/misago/userslists/online.html

@@ -9,7 +9,7 @@
 <a href="{% url USER_PROFILE_URL user_slug=card.user.slug user_id=card.user.id %}" class="user-card {% if card.user.rank.css_class %}card-{{ card.user.rank.css_class }}{% endif %}">
 <a href="{% url USER_PROFILE_URL user_slug=card.user.slug user_id=card.user.id %}" class="user-card {% if card.user.rank.css_class %}card-{{ card.user.rank.css_class }}{% endif %}">
   <img src="{{ card.user|avatar:400 }}" alt="{% trans "Avatar" %}">
   <img src="{{ card.user|avatar:400 }}" alt="{% trans "Avatar" %}">
   <div class="card-footer">
   <div class="card-footer">
-    <h4 class="user-name">{{ card.user.username }}</h4>
+    <h4 class="user-name">{{ card.user }}</h4>
     <small>
     <small>
       <abbr class="tooltip-top dynamic time-ago" title="{% blocktrans with last_click=card.last_click|date:"TIME_FORMAT" %}Last click on {{ last_click }}{% endblocktrans %}" data-timestamp="{{ card.last_click|date:"c" }}">
       <abbr class="tooltip-top dynamic time-ago" title="{% blocktrans with last_click=card.last_click|date:"TIME_FORMAT" %}Last click on {{ last_click }}{% endblocktrans %}" data-timestamp="{{ card.last_click|date:"c" }}">
         {{ card.last_click|date }}
         {{ card.last_click|date }}
@@ -53,7 +53,7 @@
           </a>
           </a>
         </td>
         </td>
         <td>
         <td>
-          <a href="{{ user_url }}" class="item-title">{{ online.user.username }}</a>
+          <a href="{{ user_url }}" class="item-title">{{ online.user }}</a>
         </td>
         </td>
         <td>
         <td>
           <abbr class="tooltip-top dynamic time-ago" title="{% blocktrans with last_click=online.last_click|date:"TIME_FORMAT" %}Last click on {{ last_click }}{% endblocktrans %}" data-timestamp="{{ online.last_click|date:"c" }}">
           <abbr class="tooltip-top dynamic time-ago" title="{% blocktrans with last_click=online.last_click|date:"TIME_FORMAT" %}Last click on {{ last_click }}{% endblocktrans %}" data-timestamp="{{ online.last_click|date:"c" }}">

+ 1 - 1
misago/templates/misago/userslists/rank.html

@@ -70,7 +70,7 @@ There are {{ users }} users with {{ rank }} rank.
   <img src="{{ card|avatar:400 }}" alt="{% trans "Avatar" %}">
   <img src="{{ card|avatar:400 }}" alt="{% trans "Avatar" %}">
   <div class="card-footer">
   <div class="card-footer">
     {% block user-card-footer %}
     {% block user-card-footer %}
-    <h4 class="user-name">{{ card.username }}</h4>
+    <h4 class="user-name">{{ card }}</h4>
     {% if card.title %}
     {% if card.title %}
     <small>{{ card.title }}</small>
     <small>{{ card.title }}</small>
     {% elif rank.title %}
     {% elif rank.title %}

+ 0 - 0
misago/threads/tests/test_thread_view.py


+ 5 - 1
misago/threads/views/generic/thread/threadactions.py

@@ -1,4 +1,5 @@
 from django.contrib import messages
 from django.contrib import messages
+from django.db.transaction import atomic
 from django.shortcuts import redirect, render
 from django.shortcuts import redirect, render
 from django.utils.translation import ugettext as _
 from django.utils.translation import ugettext as _
 
 
@@ -187,7 +188,10 @@ class ThreadActions(ActionsBase):
         messages.success(request, _("Thread was hid."))
         messages.success(request, _("Thread was hid."))
 
 
     def action_delete(self, request, thread):
     def action_delete(self, request, thread):
-        moderation.delete_thread(request.user, thread)
+        with atomic():
+            moderation.delete_thread(request.user, thread)
+            self.forum.synchronize()
+            self.forum.save()
 
 
         message = _('Thread "%(thread)s" was deleted.')
         message = _('Thread "%(thread)s" was deleted.')
         messages.success(request, message % {'thread': thread.title})
         messages.success(request, message % {'thread': thread.title})

+ 3 - 0
misago/users/models/warnings.py

@@ -67,6 +67,9 @@ class WarningLevel(models.Model):
 
 
     objects = WarningLevelManager()
     objects = WarningLevelManager()
 
 
+    def __unicode__(self):
+        return self.name
+
     def save(self, *args, **kwargs):
     def save(self, *args, **kwargs):
         if not self.pk:
         if not self.pk:
             self.set_level()
             self.set_level()