Commit 5113d8fd authored by Skia's avatar Skia

Small user profile fix

parent 43b709bf
Pipeline #111 failed with stage
in 1 minute and 44 seconds
# -*- 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">&laquo; {{ profile.nick_name }} &raquo;</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 %}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment