~unity-2d-team/unity-2d/Shell-MultiMonitor

« back to all changes in this revision

Viewing changes to grackle/wsgi.py

  • Committer: William Grant
  • Date: 2012-01-22 11:01:25 UTC
  • Revision ID: william.grant@canonical.com-20120122110125-gd5wzvh60fnm5mrj
Template messages yay.

Show diffs side-by-side

added added

removed removed

Lines of Context:
61
61
        except (AttributeError, ValueError):
62
62
            count = 10
63
63
        order = getattr(args, 'order', '-date')
64
 
        memo = getattr(args, 'memo', '')
65
 
        prev, messages, next = conn.get_messages(name, order, count, memo)
 
64
        start = getattr(args, 'start', '')
 
65
        if start:
 
66
            start = uuid.UUID(start)
 
67
        messages, next_memo = conn.get_messages(name, order, count, start)
66
68
        return json.dumps({
67
 
            'prev_memo': prev,
68
69
            'messages': messages,
69
 
            'next_memo': next,
 
70
            'next_memo': next_memo,
70
71
            })
71
72
 
72
73