diff --git a/users/migrations/0051_user_telephone.py b/users/migrations/0051_user_telephone.py new file mode 100644 index 00000000..32aedebc --- /dev/null +++ b/users/migrations/0051_user_telephone.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-06-25 02:06 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0050_serviceuser_comment'), + ] + + operations = [ + migrations.AddField( + model_name='user', + name='telephone', + field=models.CharField(blank=True, max_length=15, null=True), + ), + ] diff --git a/users/models.py b/users/models.py index 247d533c..4fd4aa98 100644 --- a/users/models.py +++ b/users/models.py @@ -163,6 +163,7 @@ class User(AbstractBaseUser): pwd_ntlm = models.CharField(max_length=255) state = models.IntegerField(choices=STATES, default=STATE_ACTIVE) registered = models.DateTimeField(auto_now_add=True) + telephone = models.CharField(max_length=15, blank=True, null=True) uid_number = models.IntegerField(default=auto_uid, unique=True) rezo_rez_uid = models.IntegerField(unique=True, blank=True, null=True) @@ -683,6 +684,7 @@ class BaseInfoForm(ModelForm): 'school', 'comment', 'room', + 'telephone', ] class EditInfoForm(BaseInfoForm): @@ -696,6 +698,7 @@ class EditInfoForm(BaseInfoForm): 'comment', 'room', 'shell', + 'telephone', ] class InfoForm(EditInfoForm): @@ -822,7 +825,3 @@ class WhitelistForm(ModelForm): if date_end < timezone.now(): raise forms.ValidationError("Triple buse, la date de fin ne peut pas être avant maintenant... Re2o ne voyage pas dans le temps") return date_end - - -class ProfilForm(Form): - user = forms.CharField(label='Ok', max_length=100) diff --git a/users/templates/users/profil.html b/users/templates/users/profil.html index b4137e4e..5478b1c7 100644 --- a/users/templates/users/profil.html +++ b/users/templates/users/profil.html @@ -69,17 +69,24 @@ with this program; if not, write to the Free Software Foundation, Inc., E-mail {{ user.email }} + + Chambre + {{ user.room }} + Téléphone + {{ user.telephone }} + École {{ user.school }} Commentaire {{ user.comment }} - - Chambre - {{ user.room }} + + Date d'inscription {{ user.registered }} + Dernière connexion + {{ user.last_login }} Fin d'adhésion @@ -123,10 +130,6 @@ with this program; if not, write to the Free Software Foundation, Inc., {% else %} Aucun {% endif %} - - Dernière connexion - {{ user.last_login }} -

Machines :

Ajouter une machine