added pronoun to fields
This commit is contained in:
parent
316a9448a4
commit
715566db8a
4 changed files with 26 additions and 1 deletions
|
@ -8,6 +8,7 @@ class ProfileForm(forms.ModelForm):
|
|||
fields = [
|
||||
"full_name",
|
||||
"nickname",
|
||||
"pronoun",
|
||||
"picture",
|
||||
"department",
|
||||
"promotion",
|
||||
|
|
18
fiches/migrations/0005_profile_pronoun.py
Normal file
18
fiches/migrations/0005_profile_pronoun.py
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Generated by Django 2.2.9 on 2020-02-19 20:30
|
||||
|
||||
from django.db import migrations, models
|
||||
|
||||
|
||||
class Migration(migrations.Migration):
|
||||
|
||||
dependencies = [
|
||||
('fiches', '0004_auto_20200212_2130'),
|
||||
]
|
||||
|
||||
operations = [
|
||||
migrations.AddField(
|
||||
model_name='profile',
|
||||
name='pronoun',
|
||||
field=models.CharField(blank=True, max_length=15, verbose_name='pronom utilisé'),
|
||||
),
|
||||
]
|
|
@ -13,6 +13,7 @@ class Profile(models.Model):
|
|||
)
|
||||
full_name = models.CharField(max_length=1023, verbose_name=_("nom"))
|
||||
nickname = models.CharField(blank=True, max_length=1023, verbose_name=_("surnom"))
|
||||
pronoun = models.CharField(blank=True, max_length = 15, verbose_name=_("pronom utilisé"))
|
||||
picture = models.ImageField(
|
||||
blank=True, upload_to="picture", verbose_name=_("photo")
|
||||
)
|
||||
|
|
|
@ -8,8 +8,13 @@
|
|||
<h3>{{ profile.full_name }}
|
||||
({{ profile.promotion }})
|
||||
{% if profile.nickname %}
|
||||
<em>alias:</em>{{ profile.nickname }})</h3>
|
||||
(<em>alias:</em>{{ profile.nickname }})</h3>
|
||||
{% endif %}
|
||||
<p>
|
||||
{% if profile.pronoun %}
|
||||
<em>Pronom utilisé :</em>{{ profile.pronoun }}
|
||||
{% endif %}
|
||||
</p>
|
||||
<p>
|
||||
{% if profile.department.exists %}
|
||||
<em>Département{{ profile.department.count|pluralize}} :</em>
|
||||
|
|
Loading…
Reference in a new issue