diff --git a/api/serializers.py b/api/serializers.py index f520cf98..32fdd0e8 100644 --- a/api/serializers.py +++ b/api/serializers.py @@ -407,9 +407,8 @@ class GeneralOptionSerializer(NamespacedHMSerializer): fields = ('general_message_fr', 'general_message_en', 'search_display_page', 'pagination_number', 'pagination_large_number', 'req_expire_hrs', - 'site_name', 'email_from', 'GTU_sum_up', - 'GTU') - + 'site_name', 'main_site_url', 'email_from', + 'GTU_sum_up', 'GTU') class HomeServiceSerializer(NamespacedHMSerializer): """Serialize `preferences.models.Service` objects. diff --git a/preferences/migrations/0055_generaloption_main_site_url.py b/preferences/migrations/0055_generaloption_main_site_url.py new file mode 100644 index 00000000..71ea9852 --- /dev/null +++ b/preferences/migrations/0055_generaloption_main_site_url.py @@ -0,0 +1,20 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.7 on 2018-11-14 16:46 +from __future__ import unicode_literals + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('preferences', '0054_merge_20181025_1258'), + ] + + operations = [ + migrations.AddField( + model_name='generaloption', + name='main_site_url', + field=models.URLField(default='http://re2o.example.org', max_length=255), + ), + ] diff --git a/preferences/models.py b/preferences/models.py index b21f42fe..43ff7580 100644 --- a/preferences/models.py +++ b/preferences/models.py @@ -431,6 +431,7 @@ class GeneralOption(AclMixin, PreferencesModel): req_expire_hrs = models.IntegerField(default=48) site_name = models.CharField(max_length=32, default="Re2o") email_from = models.EmailField(default="www-data@example.com") + main_site_url = models.URLField(max_length=255, default="http://re2o.example.org") GTU_sum_up = models.TextField( default="", blank=True, diff --git a/preferences/templates/preferences/display_preferences.html b/preferences/templates/preferences/display_preferences.html index 1c29c595..96d3fe16 100644 --- a/preferences/templates/preferences/display_preferences.html +++ b/preferences/templates/preferences/display_preferences.html @@ -224,10 +224,12 @@ with this program; if not, write to the Free Software Foundation, Inc.,