diff --git a/preferences/migrations/0031_auto_20180323_0218.py b/preferences/migrations/0031_auto_20180323_0218.py new file mode 100644 index 00000000..25c98cbf --- /dev/null +++ b/preferences/migrations/0031_auto_20180323_0218.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-03-23 01:18 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0030_merge_20180320_1419'), + ] + + operations = [ + migrations.AlterField( + model_name='generaloption', + name='email_from', + field=models.EmailField(default='www-data@example.com', max_length=254), + ), + ] diff --git a/preferences/migrations/0032_optionaluser_shell_default.py b/preferences/migrations/0032_optionaluser_shell_default.py new file mode 100644 index 00000000..365a616e --- /dev/null +++ b/preferences/migrations/0032_optionaluser_shell_default.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-03-24 19:22 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('users', '0070_auto_20180324_1906'), + ('preferences', '0031_auto_20180323_0218'), + ] + + operations = [ + migrations.AddField( + model_name='optionaluser', + name='shell_default', + field=models.OneToOneField(blank=True, null=True, on_delete=django.db.models.deletion.PROTECT, to='users.ListShell'), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index 80c3271e..5238e1a5 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -89,6 +89,12 @@ class OptionalUser(PreferencesModel): default=False, help_text="Un nouvel utilisateur peut se créer son compte sur re2o" ) + shell_default = models.OneToOneField( + 'users.ListShell', + on_delete=models.PROTECT, + blank=True, + null=True + ) class Meta: permissions = ( diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 26fc0308..4b234c5c 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -68,7 +68,9 @@ with this program; if not, write to the Free Software Foundation, Inc.,