add Config-source to use config entries in web interface
authorFelix Domke <tmbinc@elitedvb.net>
Tue, 3 Oct 2006 00:00:04 +0000 (00:00 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Tue, 3 Oct 2006 00:00:04 +0000 (00:00 +0000)
lib/python/Components/Sources/Config.py [new file with mode: 0644]

diff --git a/lib/python/Components/Sources/Config.py b/lib/python/Components/Sources/Config.py
new file mode 100644 (file)
index 0000000..b893909
--- /dev/null
@@ -0,0 +1,19 @@
+from Source import Source
+
+class Config(Source):
+       def __init__(self, config):
+               Source.__init__(self)
+               self.__config = config
+
+       def getConfig(self):
+               return self.__config
+       
+       config = property(getConfig)
+
+       def getHTML(self, id):
+               print "getHTML", self, id
+               return self.__config.getHTML(id)
+
+       def handleCommand(self, cmd):
+               print "ASSIGN:", cmd
+               self.__config.unsafeAssign(cmd)