diff data/plugin/action/submitcsv.py @ 626:f64779d5d500

FormSubmit: simplify code, auto-provide filename
author Thomas Waldmann <tw AT waldmann-edv DOT de>
date Mon, 25 Mar 2013 18:29:47 +0100
parents f4e63b74b969
children f683dea1ac1b
line wrap: on
line diff
--- a/data/plugin/action/submitcsv.py	Mon Mar 25 17:47:30 2013 +0100
+++ b/data/plugin/action/submitcsv.py	Mon Mar 25 18:29:47 2013 +0100
@@ -32,13 +32,8 @@
         SubmitBase.__init__(self, pagename, request)
         
         self.delimiter = ';'
-        self.targetFile = ""
-        
-        if "targetfile" in request.form:
-            self.targetFile = request.form.get("targetfile")
-        else:
-            self.targetFile = u"list.csv"
-        
+        self.targetFile = request.form.get("targetfile", "list.csv")
+
     def sanitize(self):
         SubmitBase.sanitize(self)
         self.targetFile = wikiutil.clean_input(self.targetFile)