mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-22 14:13:21 +00:00
Small fixes
This commit is contained in:
parent
f7e3251ae5
commit
d27f62dca9
@ -11,11 +11,13 @@
|
|||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
>{% trans %}Infos{% endtrans %}</a>
|
>{% trans %}Infos{% endtrans %}</a>
|
||||||
|
|
||||||
|
{% if profile == user %}
|
||||||
<a href="{{ url('core:user_tools') }}"
|
<a href="{{ url('core:user_tools') }}"
|
||||||
{%- if tab == "tools" -%}
|
{%- if tab == "tools" -%}
|
||||||
class="selected_tab"
|
class="selected_tab"
|
||||||
{%- endif -%}
|
{%- endif -%}
|
||||||
>{% trans %}Tools{% endtrans %}</a>
|
>{% trans %}Tools{% endtrans %}</a>
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
<a href="{{ url('core:user_stats', user_id=profile.id) }}"
|
<a href="{{ url('core:user_stats', user_id=profile.id) }}"
|
||||||
{%- if tab == "stats" -%}
|
{%- if tab == "stats" -%}
|
||||||
|
@ -81,6 +81,7 @@ class LoginForm(AuthenticationForm):
|
|||||||
user = User.objects.filter(email=data['username']).first()
|
user = User.objects.filter(email=data['username']).first()
|
||||||
else:
|
else:
|
||||||
user = User.objects.filter(username=data['username']).first()
|
user = User.objects.filter(username=data['username']).first()
|
||||||
|
if user:
|
||||||
data['username'] = user.username
|
data['username'] = user.username
|
||||||
kwargs['data'] = data
|
kwargs['data'] = data
|
||||||
super(LoginForm, self).__init__(*arg, **kwargs)
|
super(LoginForm, self).__init__(*arg, **kwargs)
|
||||||
|
Loading…
Reference in New Issue
Block a user