Petar Radosevic avatar Petar Radosevic committed f160c27

Contexts and template cleanup. Thanks klipstein.

Comments (0)

Files changed (12)

userena/templates/userena/email_change_complete.html

 {% block content_title %}<h2>{% trans 'Confirm your new email' %}</h2>{% endblock %}
 
 {% block content %}
-<p>{% blocktrans with account.email_unconfirmed as email %}You have received an email at {{ email }}.{% endblocktrans %}</p>
-<p>{% blocktrans with account.username as username %}To associate this email address with your account ({{ username }}) click on the link provided in this email.{% endblocktrans %}</p>
+<p>{% blocktrans with viewed_user.email_unconfirmed as email %}You have received an email at {{ email }}.{% endblocktrans %}</p>
+<p>{% blocktrans with viewed_user.username as username %}To associate this email address with your account ({{ username }}) click on the link provided in this email.{% endblocktrans %}</p>
 {% endblock %}

userena/templates/userena/email_form.html

 {% extends 'userena/base_userena.html' %}
 {% load i18n %}
 
-{% block content_title %}<h2>{% blocktrans with account.user.username as username %}Account &raquo; {{ username }}{% endblocktrans %}</h2>{% endblock %}
+{% block content_title %}<h2>{% blocktrans with user.username as username %}Account &raquo; {{ username }}{% endblocktrans %}</h2>{% endblock %}
 
 {% block content %}
 <form action="" method="post">
-    {% if user.username == account.user.username %}
-          <ul id="box-nav">
-              <li class="first"><a href="{% url userena_detail user.username %}"><span>{% trans 'View profile' %}</span></a></li>
-              <li><a href="{% url userena_edit account.user.username %}">{% trans "Edit profile" %}</a></li>
-              <li><a href="{% url userena_password_change account.user.username %}">{% trans "Change password" %}</a></li>
-              <li class="last selected"><a href="{% url userena_email_change account.user.username %}">{% trans "Change email" %}</a></li>
-          </ul>
-          {% endif %}
-    {% csrf_token %}
-    <fieldset>
-        <legend>{% trans "Change email address" %}</legend>
-        {{ form.as_p }}
-    </fieldset>
-    <input type="submit" value="{% trans "Change email" %}" />
+  <ul id="box-nav">
+    <li class="first"><a href="{% url userena_detail user.username %}"><span>{% trans 'View profile' %}</span></a></li>
+    <li><a href="{% url userena_edit user.username %}">{% trans "Edit profile" %}</a></li>
+    <li><a href="{% url userena_password_change user.username %}">{% trans "Change password" %}</a></li>
+    <li class="last selected"><a href="{% url userena_email_change user.username %}">{% trans "Change email" %}</a></li>
+  </ul>
+  {% csrf_token %}
+  <fieldset>
+    <legend>{% trans "Change email address" %}</legend>
+    {{ form.as_p }}
+  </fieldset>
+  <input type="submit" value="{% trans "Change email" %}" />
 </form>
 {% endblock %}

userena/templates/userena/password_form.html

 
 {% block title %}{% trans "Change password" %}{% endblock %}
 
-{% block content_title %}<h2>{% blocktrans with account.user.username as username %}Account &raquo; {{ username }}{% endblocktrans %}</h2>{% endblock %}
+{% block content_title %}<h2>{% blocktrans with user.username as username %}Account &raquo; {{ username }}{% endblocktrans %}</h2>{% endblock %}
 
 {% block content %}
 <form action="" method="post" id="password_change_form">
-    {% if user.username == account.user.username %}
-          <ul id="box-nav">
-              <li class="first"><a href="{% url userena_detail user.username %}"><span>{% trans 'View profile' %}</span></a></li>
-              <li><a href="{% url userena_edit account.user.username %}">{% trans "Edit profile" %}</a></li>
-              <li  class="selected"><a href="{% url userena_password_change account.user.username %}">{% trans "Change password" %}</a></li>
-              <li class="last"><a href="{% url userena_email_change account.user.username %}">{% trans "Change email" %}</a></li>
-          </ul>
-          {% endif %}
-    <fieldset>
-        <legend>{% trans "Change Password" %}</legend>
-        {% csrf_token %}
-        {{ form.as_p }}
-    </fieldset>
-    <input type="submit" value="{% trans "Change password" %}" />
+  <ul id="box-nav">
+    <li class="first"><a href="{% url userena_detail user.username %}"><span>{% trans 'View profile' %}</span></a></li>
+    <li><a href="{% url userena_edit user.username %}">{% trans "Edit profile" %}</a></li>
+    <li  class="selected"><a href="{% url userena_password_change user.username %}">{% trans "Change password" %}</a></li>
+    <li class="last"><a href="{% url userena_email_change user.username %}">{% trans "Change email" %}</a></li>
+  </ul>
+  <fieldset>
+    <legend>{% trans "Change Password" %}</legend>
+    {% csrf_token %}
+    {{ form.as_p }}
+  </fieldset>
+  <input type="submit" value="{% trans "Change password" %}" />
 </form>
 {% endblock %}

userena/templates/userena/password_reset_confirm_form.html

 
 {% block content %}
 <form action="" method="post">
-    <fieldset>
-        <legend>{% trans "Reset Password" %}</legend>
-        {% csrf_token %}
-        {{ form.as_p }}
-    </fieldset>
-    <input type="submit" value="{% trans "Reset password" %}" />
+  <fieldset>
+    <legend>{% trans "Reset Password" %}</legend>
+    {% csrf_token %}
+    {{ form.as_p }}
+  </fieldset>
+  <input type="submit" value="{% trans "Reset password" %}" />
 </form>
 {% endblock %}

userena/templates/userena/password_reset_form.html

 
 {% block content %}
 <form action="" method="post">
-    <fieldset>
-        <legend>{% trans "Reset Password" %}</legend>
-        {% csrf_token %}
-        {{ form.as_p }}
-    <fieldset>
-    <input type="submit" value="{% trans "Send password" %}" />
+  <fieldset>
+    <legend>{% trans "Reset Password" %}</legend>
+    {% csrf_token %}
+    {{ form.as_p }}
+  </fieldset>
+  <input type="submit" value="{% trans "Send password" %}" />
 </form>
 {% endblock %}

userena/templates/userena/profile_detail.html

 {% block content %}
 <div class="white-box">
 
-    {% comment %}Dirty hack. Will use django-guardian in the future.{% endcomment %}
-    {% if user.username == profile.user.username %}
-    <ul id="box-nav">
-        <li><a href="{% url userena_profile_detail user.username %}">{% trans "View profile" %} &raquo;</a></li>
-        <li><a href="{% url userena_profile_edit user.username %}">{% trans "Edit details" %} &raquo;</a></li>
-        <li><a href="{% url userena_password_change user.username %}">{% trans "Change password" %} &raquo;</a></li>
-        <li><a href="{% url userena_email_change user.username %}">{% trans "Change email" %} &raquo;</a></li>
-    </ul>
-    {% endif %}
+  {% comment %}Dirty hack. Will use django-guardian in the future.{% endcomment %}
+  {% if user.username == profile.user.username %}
+  <ul id="box-nav">
+    <li><a href="{% url userena_profile_detail user.username %}">{% trans "View profile" %} &raquo;</a></li>
+    <li><a href="{% url userena_profile_edit user.username %}">{% trans "Edit details" %} &raquo;</a></li>
+    <li><a href="{% url userena_password_change user.username %}">{% trans "Change password" %} &raquo;</a></li>
+    <li><a href="{% url userena_email_change user.username %}">{% trans "Change email" %} &raquo;</a></li>
+  </ul>
+  {% endif %}
 
-    <div id="details">
+  <div id="details">
     <img src="{{ profile.get_mugshot_url }}" alt="{% trans "Your mugshot" %}" />
     {% if profile.user.get_full_name %}
     <p><strong>{% trans "Name" %}</strong><br /> {{ profile.user.get_full_name }}</p>
     {% if profile.about_me %}
     <p><strong>{% trans "About me" %}</strong><br />{{ profile.about_me }}</p>
     {% endif %}
-    </div>
+  </div>
 </div>
 {% endblock %}

userena/templates/userena/profile_form.html

 
 {% block title %}{% trans "Account setup" %}{% endblock %}
 
-{% block content_title %}<h2>{% blocktrans with account.user.username as username %}Account &raquo; {{ username }}{% endblocktrans %}</h2>{% endblock %}
+{% block content_title %}<h2>{% blocktrans with profile.user.username as username %}Account &raquo; {{ username }}{% endblocktrans %}</h2>{% endblock %}
 
 {% block content %}
 
-   <form action="" enctype="multipart/form-data" method="post">
-       {% if user.username == account.user.username %}
-          <ul id="box-nav">
-              <li class="first"><a href="{% url userena_detail user.username %}"><span>{% trans 'View profile' %}</span></a></li>
-              <li class="selected"><a href="{% url userena_edit account.user.username %}">{% trans "Edit profile" %}</a></li>
-              <li><a href="{% url userena_password_change account.user.username %}">{% trans "Change password" %}</a></li>
-              <li class="last"><a href="{% url userena_email_change account.user.username %}">{% trans "Change email" %}</a></li>
-          </ul>
-          {% endif %}
-       {% csrf_token %}
-        <fieldset>
-        <legend>{% trans "Edit Profile" %}</legend>
-        {{ form.as_p }}
-        </fieldset>
-        <input type="submit" value="{% trans "Save changes" %}" />
-    </form>
+<form action="" enctype="multipart/form-data" method="post">
+  <ul id="box-nav">
+    <li class="first"><a href="{% url userena_detail user.username %}"><span>{% trans 'View profile' %}</span></a></li>
+    <li class="selected"><a href="{% url userena_edit user.username %}">{% trans "Edit profile" %}</a></li>
+    <li><a href="{% url userena_password_change user.username %}">{% trans "Change password" %}</a></li>
+    <li class="last"><a href="{% url userena_email_change user.username %}">{% trans "Change email" %}</a></li>
+  </ul>
+  {% csrf_token %}
+  <fieldset>
+    <legend>{% trans "Edit Profile" %}</legend>
+    {{ form.as_p }}
+  </fieldset>
+  <input type="submit" value="{% trans "Save changes" %}" />
+</form>
 {% endblock %}

userena/templates/userena/profile_list.html

 {% block content_title %}<h2>{% trans 'Profiles' %}</h2>{% endblock %}
 
 {% block content %}
-<ul id="account_list">
-    {% for profile in profile_list %}
-    <li>
-        <a href="{% url userena_profile_detail profile.user.username %}"><img src="{{ profile.get_mugshot_url }}" /></a>
-        <a href="{% url userena_profile_detail profile.user.username %}">{{ profile.user.username }}</a>
-    </li>
-    {% endfor %}
+<ul id="profile_list">
+  {% for profile in profile_list %}
+  <li>
+  <a href="{% url userena_profile_detail profile.user.username %}"><img src="{{ profile.get_mugshot_url }}" /></a>
+  <a href="{% url userena_profile_detail profile.user.username %}">{{ profile.user.username }}</a>
+  </li>
+  {% endfor %}
 
 </ul>
 
 {% if is_paginated %}
 <div class="pagination">
-    <span class="step-links">
-        {% if page_obj.has_previous %}
-            <a href="{% url userena_profile_list_paginated page_obj.previous_page_number %}">{% trans 'previous' %}</a>
-        {% endif %}
+  <span class="step-links">
+    {% if page_obj.has_previous %}
+    <a href="{% url userena_profile_list_paginated page_obj.previous_page_number %}">{% trans 'previous' %}</a>
+    {% endif %}
 
-        <span class="current">
-            {% blocktrans with page_obj.number as page and page_obj.paginator.num_pages as num_pages %}
-              Page {{ page }} of {{ num_pages }}
-            {% endblocktrans %}
-        </span>
-
-        {% if page_obj.has_next %}
-            <a href="{% url userena_profile_list_paginated  page_obj.next_page_number %}">{% trans 'next' %}</a>
-        {% endif %}
+    <span class="current">
+      {% blocktrans with page_obj.number as page and page_obj.paginator.num_pages as num_pages %}
+      Page {{ page }} of {{ num_pages }}
+      {% endblocktrans %}
     </span>
+
+    {% if page_obj.has_next %}
+    <a href="{% url userena_profile_list_paginated  page_obj.next_page_number %}">{% trans 'next' %}</a>
+    {% endif %}
+  </span>
 </div>
 {% endif %}
 {% endblock %}

userena/templates/userena/signin_form.html

 
 {% block content %}
 <form action="" method="post">
-    {% csrf_token %}
-    <fieldset>
-        <legend>{% trans "Signin" %}</legend>
-        {{ form.non_field_errors }}
-        {% for field in form %}
-        {{ field.errors }}
-        {% comment %} Displaying checkboxes differently {% endcomment %}
-        {% if field.name == 'remember_me' %}
-        <p class="checkbox">
-            <label for="id_{{ field.name }}">{{ field }} {{ field.label }}</label>
-        </p>
-        {% else %}
-        <p>
-            {{ field.label_tag }} 
-            {{ field }}
-        </p>
-        {% endif %}
-        {% endfor %}
-    </fieldset>
-    <input type="submit" value="{% trans "Signin" %}" />
-    <p class="forgot-password"><a href="{% url userena_password_reset %}" title="{% trans "Forgot your password?" %}">{% trans "Forgot your password?" %}</a></p>
+  {% csrf_token %}
+  <fieldset>
+    <legend>{% trans "Signin" %}</legend>
+    {{ form.non_field_errors }}
+    {% for field in form %}
+    {{ field.errors }}
+    {% comment %} Displaying checkboxes differently {% endcomment %}
+    {% if field.name == 'remember_me' %}
+    <p class="checkbox">
+    <label for="id_{{ field.name }}">{{ field }} {{ field.label }}</label>
+    </p>
+    {% else %}
+    <p>
+    {{ field.label_tag }} 
+    {{ field }}
+    </p>
+    {% endif %}
+    {% endfor %}
+  </fieldset>
+  <input type="submit" value="{% trans "Signin" %}" />
+  <p class="forgot-password"><a href="{% url userena_password_reset %}" title="{% trans "Forgot your password?" %}">{% trans "Forgot your password?" %}</a></p>
 </form>
 {% endblock %}

userena/templates/userena/signup_form.html

 
 {% block content %}
 <form action="" method="post">
-    {% csrf_token %}
-    <fieldset>
-        <legend>Signup</legend>
-        {% for field in form %}
-        {{ field.errors }}
-        {% comment %} Displaying checkboxes differently {% endcomment %}
-        {% if field.name == 'tos' %}
-        <p class="checkbox">
-            <label for="id_{{ field.name }}">{{ field }} {{ field.label }}</label>
-        </p>
-        {% else %}
-        <p>
-            {{ field.label_tag }} 
-            {{ field }}
-        </p>
-        {% endif %}
-        {% endfor %}
-    </fieldset>
-    <input type="submit" value="{% trans "Signup"%}" />
+  {% csrf_token %}
+  <fieldset>
+    <legend>Signup</legend>
+    {% for field in form %}
+    {{ field.errors }}
+    {% comment %} Displaying checkboxes differently {% endcomment %}
+    {% if field.name == 'tos' %}
+    <p class="checkbox">
+    <label for="id_{{ field.name }}">{{ field }} {{ field.label }}</label>
+    </p>
+    {% else %}
+    <p>
+    {{ field.label_tag }} 
+    {{ field }}
+    </p>
+    {% endif %}
+    {% endfor %}
+  </fieldset>
+  <input type="submit" value="{% trans "Signup"%}" />
 </form>
 {% endblock %}
 from userena import settings as userena_settings
 
 urlpatterns = patterns('',
-                       # Signup, signin and signout
-                       url(r'^signup/$',
-                           userena_views.signup,
-                           name='userena_signup'),
-                       url(r'^signin/$',
-                           userena_views.signin,
-                           name='userena_signin'),
-                       url(r'^signout/$',
-                           auth_views.logout,
-                           {'next_page': userena_settings.USERENA_REDIRECT_ON_SIGNOUT,
-                            'template_name': 'userena/signout.html'},
-                           name='userena_signout'),
+   # Signup, signin and signout
+   url(r'^signup/$',
+       userena_views.signup,
+       name='userena_signup'),
+   url(r'^signin/$',
+       userena_views.signin,
+       name='userena_signin'),
+   url(r'^signout/$',
+       auth_views.logout,
+       {'next_page': userena_settings.USERENA_REDIRECT_ON_SIGNOUT,
+        'template_name': 'userena/signout.html'},
+       name='userena_signout'),
 
-                       # Reset password
-                       url(r'^password/reset/$',
-                           auth_views.password_reset,
-                           {'template_name': 'userena/password_reset_form.html',
-                            'email_template_name': 'userena/emails/password_reset_message.txt'},
-                           name='userena_password_reset'),
-                       url(r'^password/reset/done/$',
-                           auth_views.password_reset_done,
-                           {'template_name': 'userena/password_reset_done.html'},
-                           name='userena_password_reset_done'),
-                       url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
-                           auth_views.password_reset_confirm,
-                           {'template_name': 'userena/password_reset_confirm_form.html'},
-                           name='userena_password_reset_confirm'),
-                       url(r'^password/reset/confirm/complete/$',
-                           auth_views.password_reset_complete,
-                           {'template_name': 'userena/password_reset_complete.html'}),
+   # Reset password
+   url(r'^password/reset/$',
+       auth_views.password_reset,
+       {'template_name': 'userena/password_reset_form.html',
+        'email_template_name': 'userena/emails/password_reset_message.txt'},
+       name='userena_password_reset'),
+   url(r'^password/reset/done/$',
+       auth_views.password_reset_done,
+       {'template_name': 'userena/password_reset_done.html'},
+       name='userena_password_reset_done'),
+   url(r'^password/reset/confirm/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
+       auth_views.password_reset_confirm,
+       {'template_name': 'userena/password_reset_confirm_form.html'},
+       name='userena_password_reset_confirm'),
+   url(r'^password/reset/confirm/complete/$',
+       auth_views.password_reset_complete,
+       {'template_name': 'userena/password_reset_complete.html'}),
 
-                       # Signup
-                       url(r'^(?P<username>[\.\w]+)/signup/complete/$',
-                           userena_views.direct_to_user_template,
-                           {'template_name': 'userena/signup_complete.html',
-                            'extra_context': {'userena_activation_days': userena_settings.USERENA_ACTIVATION_DAYS}},
-                           name='userena_signup_complete'),
+   # Signup
+   url(r'^(?P<username>[\.\w]+)/signup/complete/$',
+       userena_views.direct_to_user_template,
+       {'template_name': 'userena/signup_complete.html',
+        'extra_context': {'userena_activation_days': userena_settings.USERENA_ACTIVATION_DAYS}},
+       name='userena_signup_complete'),
 
-                       # Activate
-                       url(r'^(?P<username>[\.\w]+)/activate/complete/$',
-                           userena_views.direct_to_user_template,
-                           {'template_name': 'userena/activate_complete.html'},
-                           name='userena_activate_complete'),
-                       url(r'^(?P<username>[\.\w]+)/activate/(?P<activation_key>\w+)/$',
-                           userena_views.activate,
-                           name='userena_activate'),
+   # Activate
+   url(r'^(?P<username>[\.\w]+)/activate/(?P<activation_key>\w+)/$',
+       userena_views.activate,
+       name='userena_activate'),
 
-                       # Change email and confirm it
-                       url(r'^(?P<username>[\.\w]+)/email/$',
-                           userena_views.email_change,
-                           name='userena_email_change'),
-                       url(r'^(?P<username>[\.\w]+)/email/complete/$',
-                           userena_views.direct_to_user_template,
-                           {'template_name': 'userena/email_change_complete.html'},
-                           name='userena_email_change_complete'),
-                       url(r'^(?P<username>[\.\w]+)/confirm-email/complete/$',
-                           userena_views.direct_to_user_template,
-                           {'template_name': 'userena/email_confirm_complete.html'},
-                           name='userena_email_confirm_complete'),
-                       url(r'^(?P<username>[\.\w]+)/confirm-email/(?P<confirmation_key>\w+)/$',
-                           userena_views.email_confirm,
-                           name='userena_email_confirm'),
+   # Change email and confirm it
+   url(r'^(?P<username>[\.\w]+)/email/$',
+       userena_views.email_change,
+       name='userena_email_change'),
+   url(r'^(?P<username>[\.\w]+)/email/complete/$',
+       userena_views.direct_to_user_template,
+       {'template_name': 'userena/email_change_complete.html'},
+       name='userena_email_change_complete'),
+   url(r'^(?P<username>[\.\w]+)/confirm-email/complete/$',
+       userena_views.direct_to_user_template,
+       {'template_name': 'userena/email_confirm_complete.html'},
+       name='userena_email_confirm_complete'),
+   url(r'^(?P<username>[\.\w]+)/confirm-email/(?P<confirmation_key>\w+)/$',
+       userena_views.email_confirm,
+       name='userena_email_confirm'),
 
-                       # Disabled account
-                       url(r'^(?P<username>[\.\w]+)/disabled/$',
-                           userena_views.direct_to_user_template,
-                           {'template_name': 'userena/disabled.html'},
-                           name='userena_disabled'),
+   # Disabled account
+   url(r'^(?P<username>[\.\w]+)/disabled/$',
+       userena_views.direct_to_user_template,
+       {'template_name': 'userena/disabled.html'},
+       name='userena_disabled'),
 
-                       # Change password
-                       url(r'^(?P<username>[\.\w]+)/password/$',
-                           userena_views.password_change,
-                           name='userena_password_change'),
-                       url(r'^(?P<username>[\.\w]+)/password/complete/$',
-                           userena_views.direct_to_user_template,
-                           {'template_name': 'userena/password_complete.html'},
-                           name='userena_password_change_complete'),
+   # Change password
+   url(r'^(?P<username>[\.\w]+)/password/$',
+       userena_views.password_change,
+       name='userena_password_change'),
+   url(r'^(?P<username>[\.\w]+)/password/complete/$',
+       userena_views.direct_to_user_template,
+       {'template_name': 'userena/password_complete.html'},
+       name='userena_password_change_complete'),
 
-                       # Edit profile
-                       url(r'^(?P<username>[\.\w]+)/edit/$',
-                           userena_views.profile_edit,
-                           name='userena_profile_edit'),
+   # Edit profile
+   url(r'^(?P<username>[\.\w]+)/edit/$',
+       userena_views.profile_edit,
+       name='userena_profile_edit'),
 
-                       # View profiles
-                       url(r'^(?P<username>[\.\w]+)/$',
-                           userena_views.profile_detail,
-                           name='userena_profile_detail'),
-                       url(r'^page/(?P<page>[0-9]+)/$',
-                           userena_views.profile_list,
-                           name='userena_profile_list_paginated'),
-                       url(r'^$',
-                           userena_views.profile_list,
-                           name='userena_profile_list'),
+   # View profiles
+   url(r'^(?P<username>[\.\w]+)/$',
+       userena_views.profile_detail,
+       name='userena_profile_detail'),
+   url(r'^page/(?P<page>[0-9]+)/$',
+       userena_views.profile_list,
+       name='userena_profile_list_paginated'),
+   url(r'^$',
+       userena_views.profile_list,
+       name='userena_profile_list'),
 )
         rendered template. The ``account`` key is always the ``User``
         that completed the action.
 
+    **Extra context**
+
+    ``viewed_user``
+        The currently :class:`User` that is viewed.
+
     """
     user = get_object_or_404(User, username__iexact=username)
 
     if not extra_context: extra_context = dict()
-    extra_context['account'] = user
+    extra_context['viewed_user'] = user
     return direct_to_template(request,
                               template_name,
                               extra_context=extra_context)
     ``form``
         Form used to change the password.
 
-    ``account``
-        The current active account.
-
     """
     user = get_object_or_404(User,
                              username__iexact=username)
     Edit profile.
 
     Edits a profile selected by the supplied username. First checks
-    permissions if the user is allowed to edit this account, if denied will
-    show a 404. When the account is succesfully edited will redirect to
+    permissions if the user is allowed to edit this profile, if denied will
+    show a 404. When the profile is succesfully edited will redirect to
     ``success_url``.
 
     :param username:
-        Username of the user which account should be edited.
+        Username of the user which profile should be edited.
 
     :param edit_profile_form:
 
-        Form that is used to edit the account. The :func:`EditProfileForm.save`
+        Form that is used to edit the profile. The :func:`EditProfileForm.save`
         method of this form will be called when the form
         :func:`EditProfileForm.is_valid`.  Defaults to :class:`EditProfileForm`
         from userena.
     :param extra_context:
         Dictionary containing variables that are passed on to the
         ``template_name`` template.  ``form`` key will always be the form used
-        to edit the account, and the ``account`` key is always the edited
-        account.
+        to edit the profile, and the ``profile`` key is always the edited
+        profile.
 
     **Context**
 
     ``form``
-        Form that is used to alter the account.
+        Form that is used to alter the profile.
 
-    ``account``
-        Instance of the ``Account`` that is edited.
+    ``profile``
+        Instance of the ``Profile`` that is edited.
 
     """
     user = get_object_or_404(User,
 
     if not extra_context: extra_context = dict()
     extra_context['form'] = form
-    extra_context['user'] = user
+    extra_context['profile'] = profile
     return direct_to_template(request,
                               template_name,
                               extra_context=extra_context)
     Detailed view of an user.
 
     :param username:
-        String of the username of which the account should be viewed.
+        String of the username of which the profile should be viewed.
 
     :param template_name:
         String representing the template name that should be used to display
-        the account.
+        the profile.
 
     :param extra_context:
         Dictionary of variables which should be supplied to the template. The
-        ``account`` key is always the current account.
+        ``profile`` key is always the current profile.
 
     **Context**
 
-    ``account``
-        Instance of the currently edited ``Account``.
+    ``profile``
+        Instance of the currently viewed ``Profile``.
 
     """
     user = get_object_or_404(User,
         list of all users. Defaults to ``userena/list.html``.
 
     :param paginate_by:
-        Integer defining the amount of displayed accounts per page. Defaults to
-        50 accounts per page.
+        Integer defining the amount of displayed profiles per page. Defaults to
+        50 profiles per page.
 
     :param extra_context:
         Dictionary of variables that are passed on to the ``template_name``
 
     **Context**
 
-    ``account_list``
-        A list of accounts.
+    ``profile_list``
+        A list of profiles.
 
     ``is_paginated``
         A boolean representing whether the results are paginated.
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.