diff --git a/users/migrations/0050_serviceuser_comment.py b/users/migrations/0050_serviceuser_comment.py new file mode 100644 index 00000000..37bfd5cf --- /dev/null +++ b/users/migrations/0050_serviceuser_comment.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2017-06-18 16:50 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0049_auto_20170618_1424'), + ] + + operations = [ + migrations.AddField( + model_name='serviceuser', + name='comment', + field=models.CharField(blank=True, help_text='Commentaire', max_length=255), + ), + ] diff --git a/users/models.py b/users/models.py index c69a8b0c..247d533c 100644 --- a/users/models.py +++ b/users/models.py @@ -385,6 +385,7 @@ class ServiceUser(AbstractBaseUser): pseudo = models.CharField(max_length=32, unique=True, help_text="Doit contenir uniquement des lettres, chiffres, ou tirets", validators=[linux_user_validator]) access_group = models.CharField(choices=ACCESS, default=readonly, max_length=32) + comment = models.CharField(help_text="Commentaire", max_length=255, blank=True) USERNAME_FIELD = 'pseudo' @@ -723,7 +724,7 @@ class ServiceUserForm(ModelForm): class EditServiceUserForm(ServiceUserForm): class Meta(ServiceUserForm.Meta): - fields = ['access_group'] + fields = ['access_group','comment'] class StateForm(ModelForm): class Meta: diff --git a/users/templates/users/aff_serviceusers.html b/users/templates/users/aff_serviceusers.html index 217892b0..01e223aa 100644 --- a/users/templates/users/aff_serviceusers.html +++ b/users/templates/users/aff_serviceusers.html @@ -27,6 +27,7 @@ with this program; if not, write to the Free Software Foundation, Inc.,