mirror of
https://github.com/ae-utbm/sith.git
synced 2025-07-10 03:49:24 +00:00
Small template fixes
This commit is contained in:
20
core/migrations/0003_auto_20160902_1914.py
Normal file
20
core/migrations/0003_auto_20160902_1914.py
Normal file
@ -0,0 +1,20 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
import django.core.validators
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0002_auto_20160831_0144'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='username',
|
||||
field=models.CharField(error_messages={'unique': 'A user with that username already exists.'}, max_length=254, unique=True, validators=[django.core.validators.RegexValidator('^[\\w.+-]+$', 'Enter a valid username. This value may contain only letters, numbers and ./+/-/_ characters.')], help_text='Required. 254 characters or fewer. Letters, digits and ./+/-/_ only.', verbose_name='username'),
|
||||
),
|
||||
]
|
@ -74,12 +74,12 @@ class User(AbstractBaseUser):
|
||||
_('username'),
|
||||
max_length=254,
|
||||
unique=True,
|
||||
help_text=_('Required. 254 characters or fewer. Letters, digits and @/./+/-/_ only.'),
|
||||
help_text=_('Required. 254 characters or fewer. Letters, digits and ./+/-/_ only.'),
|
||||
validators=[
|
||||
validators.RegexValidator(
|
||||
r'^[\w.@+-]+$',
|
||||
r'^[\w.+-]+$',
|
||||
_('Enter a valid username. This value may contain only '
|
||||
'letters, numbers ' 'and @/./+/-/_ characters.')
|
||||
'letters, numbers ' 'and ./+/-/_ characters.')
|
||||
),
|
||||
],
|
||||
error_messages={
|
||||
|
@ -32,6 +32,11 @@
|
||||
{% if profile.dpt_option %}
|
||||
<br>{% trans %}Option: {% endtrans %}{{ profile.dpt_option }}
|
||||
{% endif %}
|
||||
{% if profile.phone %}
|
||||
<p>
|
||||
{{ profile.phone }}
|
||||
</p>
|
||||
{% endif %}
|
||||
</p>
|
||||
{% if profile.promo %}
|
||||
<p><img src="{{ static('core/img/promo_%02d.png' % profile.promo) }}" alt="Promo {{ profile.promo }}" class="promo_pict" />
|
||||
@ -46,7 +51,14 @@
|
||||
<p>
|
||||
{% if get_subscriber(profile).is_subscribed() %}
|
||||
{% trans subscription_end=get_subscriber(profile).subscriptions.last().subscription_end %}Subscribed until {{ subscription_end }}{% endtrans %}<br/>
|
||||
{% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}
|
||||
{% trans %}Account number: {% endtrans %}{{ profile.customer.account_id }}<br/>
|
||||
{% if get_subscriber(profile).tokens.exists() %}
|
||||
<ul>
|
||||
{% for i in get_subscriber(profile).tokens.all() %}
|
||||
<li>{{ i }}</li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
{% else %}
|
||||
{% trans %}Not subscribed{% endtrans %}
|
||||
{% if user.is_in_group(settings.SITH_MAIN_BOARD_GROUP) %}
|
||||
|
Reference in New Issue
Block a user