mirror of
https://github.com/ae-utbm/sith.git
synced 2024-11-26 02:54:20 +00:00
Small user profile fix
This commit is contained in:
parent
43b709bfd5
commit
5113d8fda5
39
core/migrations/0006_auto_20160811_0450.py
Normal file
39
core/migrations/0006_auto_20160811_0450.py
Normal file
@ -0,0 +1,39 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
from __future__ import unicode_literals
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('core', '0005_auto_20160811_0319'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='dpt_option',
|
||||
field=models.CharField(verbose_name='dpt option', null=True, max_length=32, blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='forum_signature',
|
||||
field=models.TextField(verbose_name='forum signature', null=True, max_length=256, blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='quote',
|
||||
field=models.CharField(verbose_name='quote', null=True, max_length=64, blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='school',
|
||||
field=models.CharField(verbose_name='school', null=True, max_length=32, blank=True),
|
||||
),
|
||||
migrations.AlterField(
|
||||
model_name='user',
|
||||
name='semester',
|
||||
field=models.CharField(verbose_name='semester', null=True, max_length=5, blank=True),
|
||||
),
|
||||
]
|
@ -148,12 +148,12 @@ class User(AbstractBaseUser):
|
||||
("HUMAN", _("Humanities")),
|
||||
("NA", _("N/A")),
|
||||
], default="NA")
|
||||
dpt_option = models.CharField(_("dpt option"), max_length=32, default="")
|
||||
semester = models.CharField(_("semester"), max_length=5, default="")
|
||||
quote = models.CharField(_("quote"), max_length=64, default="")
|
||||
school = models.CharField(_("school"), max_length=32, default="")
|
||||
dpt_option = models.CharField(_("dpt option"), max_length=32, null=True, blank=True)
|
||||
semester = models.CharField(_("semester"), max_length=5, null=True, blank=True)
|
||||
quote = models.CharField(_("quote"), max_length=64, null=True, blank=True)
|
||||
school = models.CharField(_("school"), max_length=32, null=True, blank=True)
|
||||
promo = models.IntegerField(_("promo"), validators=[validate_promo], null=True, blank=True)
|
||||
forum_signature = models.TextField(_("forum signature"), max_length=256, default="")
|
||||
forum_signature = models.TextField(_("forum signature"), max_length=256, null=True, blank=True)
|
||||
# TODO: add phone numbers with https://github.com/stefanfoulis/django-phonenumber-field
|
||||
|
||||
objects = UserManager()
|
||||
|
@ -14,9 +14,15 @@
|
||||
<p><em>{{ profile.quote }}</em></p>
|
||||
</div>
|
||||
<h4>{{ profile.get_full_name() }}</h4>
|
||||
{% if profile.nick_name %}
|
||||
<p id="nickname">« {{ profile.nick_name }} »</p>
|
||||
{% endif %}
|
||||
{% if profile.date_of_birth %}
|
||||
<p>{% trans %}Born: {% endtrans %}{{ profile.date_of_birth|date("d/m/Y") }}</p>
|
||||
{% endif %}
|
||||
{% if profile.department != "NA" %}
|
||||
<p>{{ profile.department }}{{ profile.semester }}
|
||||
{% endif %}
|
||||
{% if profile.dpt_option %}
|
||||
<br>{% trans %}Option: {% endtrans %}{{ profile.dpt_option }}
|
||||
{% endif %}
|
||||
|
Loading…
Reference in New Issue
Block a user