Commits

Kenneth Love committed ef976ea

added ability to save lists

  • Participants
  • Parent commits 81e757a

Comments (0)

Files changed (1)

         for k, v in values:
             r.hset(key, k.strip("' "), v.strip("' "))
 
-    if rtype == 'set':
+    elif rtype == 'set':
         r.delete(key)
 
         value = request.form['value'].strip("set([])")
         for k, v in values:
             r.sadd(key, '%s:%s' % (k, v))
 
+    elif rtype == 'list':
+        r.delete(key)
+
+        value = request.form['value'].strip("[]")
+
+        for k in value.split(','):
+            r.rpush(key, k)
+
     elif rtype == 'string':
         r.set(key, value)