# HG changeset patch
# User Edouard Tisserant
# Date 1530882460 -7200
# Node ID a603d1ba287b62ec93597af015c104bff052ea3b
# Parent  8ae29ec2d1dcc517f4c0c62358b17aeed620a4e9
Added some immutable field (platform) in default runtime web setting page, for the example.

diff -r 8ae29ec2d1dc -r a603d1ba287b runtime/NevowServer.py
--- a/runtime/NevowServer.py	Fri Jul 06 15:05:03 2018 +0200
+++ b/runtime/NevowServer.py	Fri Jul 06 15:07:40 2018 +0200
@@ -26,6 +26,7 @@
 from __future__ import absolute_import
 from __future__ import print_function
 import os
+import platform
 from zope.interface import implements
 from nevow import appserver, inevow, tags, loaders, athena, url, rend
 from nevow.page import renderer
@@ -141,8 +142,8 @@
             return annotate.MethodBinding(
                 'action_'+name,
                 annotate.Method(arguments=[
-                    annotate.Argument(name, fieldtype)
-                    for fieldname,fieldtype in fields],
+                    annotate.Argument(*field)
+                    for field in fields],
                     label = desc),
                 action = btnlabel)
         setattr(self, 'bind_'+name, _bind)
@@ -154,6 +155,11 @@
 ConfigurableSettings = ConfigurableBindings()
 
 class ISettings(annotate.TypedInterface):
+    platform = annotate.String(label = _("Platform"),
+                           default = platform.system() + " " + platform.release(),
+                           immutable = True)
+    # TODO version ?
+
     def sendLogMessage(
         ctx = annotate.Context(),
         level = annotate.Choice(LogLevels,