paste* backends: Support the 'public' attribute

This commit is contained in:
Laurent Bachelier 2011-04-27 00:32:15 +02:00
commit 9022435e49
6 changed files with 27 additions and 4 deletions

View file

@ -31,12 +31,14 @@ class BasePaste(CapBaseObject):
"""
Represents a pasted text.
"""
def __init__(self, _id, title=NotLoaded, language=NotLoaded, contents=NotLoaded):
def __init__(self, _id, title=NotLoaded, language=NotLoaded, contents=NotLoaded,
public=NotLoaded):
CapBaseObject.__init__(self, unicode(_id))
self.add_field('title', basestring, title)
self.add_field('language', basestring, language)
self.add_field('contents', basestring, contents)
self.add_field('public', bool, public)
@classmethod
def id2url(cls, _id):