1. Kenneth Love
  2. Redbeard

Commits

Chris Jones  committed 22edb6f Merge

Merge.

  • Participants
  • Parent commits 82ac34c, ed7ebe0
  • Branches default

Comments (0)

Files changed (2)

File redbeard.py

View file
  • Ignore whitespace
     keys = r.keys()
     return jsonify(keys=keys)
 
-
 @app.route('/key/<key>')
 def key(key):
     """ Info for the key. """
         for k, v in values:
             r.hset(key, k.strip("' "), v.strip("' "))
 
+    if rtype == 'set':
+        r.delete(key)
+
+        value = request.form['value'].strip("set([])")
+        values = [k.split(':', 1) for k in value.split(',')]
+        for k, v in values:
+            r.sadd(key, '%s:%s' % (k, v))
+
     elif rtype == 'string':
         r.set(key, value)
 

File static/js/redbeard.js

View file
  • Ignore whitespace
 
 $(function() {
 	listFilter($('#keyheader'), $('#keylist'));
+    $(".filterform").live('submit', function(e) { e.preventDefault(); });
 
     if (window.location.hash) {
         var link = '/key/' + window.location.hash.replace('#', '');