diff --git a/openformsclient/admin.py b/openformsclient/admin.py index 8a1f544..ce4463e 100644 --- a/openformsclient/admin.py +++ b/openformsclient/admin.py @@ -16,6 +16,7 @@ class ConfigurationAdmin(SingletonModelAdmin): "fields": ( "api_root", "api_token", + "client_timeout", "status", ) }, diff --git a/openformsclient/migrations/0003_configuration_client_timeout.py b/openformsclient/migrations/0003_configuration_client_timeout.py new file mode 100644 index 0000000..89f0372 --- /dev/null +++ b/openformsclient/migrations/0003_configuration_client_timeout.py @@ -0,0 +1,21 @@ +# Generated by Django 3.2.23 on 2024-02-13 08:57 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + dependencies = [ + ("openformsclient", "0002_alter_configuration_options"), + ] + + operations = [ + migrations.AddField( + model_name="configuration", + name="client_timeout", + field=models.PositiveIntegerField( + default=5, + help_text="The timeout that is used for requests (in seconds)", + verbose_name="Client request timeout", + ), + ), + ] diff --git a/openformsclient/models.py b/openformsclient/models.py index 8c9330a..8633b04 100644 --- a/openformsclient/models.py +++ b/openformsclient/models.py @@ -36,6 +36,11 @@ class Configuration(SingletonModel): "The Open Forms API token value. Example: 7ab84e80b3d68d52a5f9e1712e3d0eda27d21e58" ), ) + client_timeout = models.PositiveIntegerField( + _("Client request timeout"), + default=5, + help_text=_("The timeout that is used for requests (in seconds)"), + ) sdk_css_url = models.URLField( _("SDK CSS URL"),