Small fixes

This commit is contained in:
Skia 2016-09-01 16:43:21 +02:00
parent f7e3251ae5
commit d27f62dca9
2 changed files with 4 additions and 1 deletions

View File

@ -11,11 +11,13 @@
{%- endif -%}
>{% trans %}Infos{% endtrans %}</a>
{% if profile == user %}
<a href="{{ url('core:user_tools') }}"
{%- if tab == "tools" -%}
class="selected_tab"
{%- endif -%}
>{% trans %}Tools{% endtrans %}</a>
{% endif %}
<a href="{{ url('core:user_stats', user_id=profile.id) }}"
{%- if tab == "stats" -%}

View File

@ -81,6 +81,7 @@ class LoginForm(AuthenticationForm):
user = User.objects.filter(email=data['username']).first()
else:
user = User.objects.filter(username=data['username']).first()
if user:
data['username'] = user.username
kwargs['data'] = data
super(LoginForm, self).__init__(*arg, **kwargs)