Exemple #1
0
class User(Document):
    email = StringProperty()
    name = StringProperty()
    password = StringProperty()

    @property
    def id(self):
        if self.new_document:
            return None
        return self._doc['_id']

    def is_authenticated(self):
        return True

    def is_active(self):
        return True

    def is_anonymous(self):
        return False

    def get_id(self):
        return unicode(self.name)

    def __repr__(self):
        return '<User %r>' % (self.name)
Exemple #2
0
class Lending(Document):
    thing = StringProperty(required=True)
    owner = StringProperty(required=True)
    to_user = StringProperty(required=True)
    lent = DateTimeProperty(default=datetime.now)
    returned = DateTimeProperty()

    __repr__ = doc_repr
Exemple #3
0
class Post(Document):
    author_id = StringProperty()
    content = StringProperty()
    content_hidden = StringProperty()
    date = DateTimeProperty()
    comments = ListProperty()

    @property
    def author(self):
        #return self.author_id
        #TODO: Check whats happends user is non existing
        return User.get(self.author_id).name
Exemple #4
0
class AuthContext(DocumentSchema):
    authenticated = BooleanProperty(default=False)
    domain = StringProperty(required=True)
    user_id = StringProperty()

    def _auth_required(self):
        domain_requires_auth(self.domain)

    def is_valid(self):
        try:
            return self.authenticated or not self._auth_required()
        except ResourceNotFound:
            return False
class Task(Document):
    author = StringProperty()
    assigned = StringProperty()
    priority = StringProperty()
    title = StringProperty()
    text = StringProperty()
    tags = StringProperty()
    status = StringProperty()
    project = StringProperty()
    comments = SetProperty()
    create_date = DateTimeProperty()
    update_date = DateTimeProperty()
    due_date = DateProperty()
Exemple #6
0
class Projects(Document):
	name = StringProperty()
	version = StringProperty()
Exemple #7
0
class ProjectTimes(Document):
	started = StringProperty()
	completed = StringProperty()
	project = StringProperty()
Exemple #8
0
class SlotTimes(Document):
	platform = StringProperty()
	time = StringProperty()
class Project(Document):
    author = StringProperty()
    title = StringProperty()
    start_date = DateProperty()
    due_date = DateProperty()
    text = StringProperty()
Exemple #10
0
class UserRecord(Document):
   user_name = StringProperty()
   creation_time = DateTimeProperty()
   
   def contains(self, key):
      return self.__contains__(key)
Exemple #11
0
class Slot_Conf(Document):
	name = StringProperty()
	build_id = IntegerProperty()
	projects = ListProperty(default = [])
	platforms = ListProperty(default = [])
class RDFEntity(Document):
    g = StringProperty()  # the graph this entity belongs to
    s = StringProperty()  # the one and only subject
    p = StringListProperty()  # list of predicates
    o = StringListProperty()  # list of objects
    o_in = StringListProperty()  # list of back-links (read: 'object in')
Exemple #13
0
class PasteEntry(Document):
    endpoint = StringProperty()
    querystr = StringProperty()
    timestamp = DateTimeProperty()
class Comment(Document):
    author = StringProperty()
    text = StringProperty()
    date = DateTimeProperty()
    task_id = StringProperty()
class Entry(Document):
	author = StringProperty()
	date = DateTimeProperty()
	title = StringProperty()
	text = StringProperty()
Exemple #16
0
class Email(Document):
    email = StringProperty()
Exemple #17
0
class TimeInfo(Document):
	type = StringProperty(default="TimeInfo")
	max = IntegerProperty()
Exemple #18
0
class Job(Document):
	platforms = ListProperty()
	slot = StringProperty()
	value = StringProperty()
	doc_type = StringProperty(default="Job")
Exemple #19
0
class Results(Document):
	project = StringProperty()
	platform = StringProperty()
	started = StringProperty()
	completed = StringProperty()
	set = StringProperty()
Exemple #20
0
class Thing(Document):
    owner = StringProperty(required=True)
    name = StringProperty(required=True)

    __repr__ = doc_repr
Exemple #21
0
class slotStartEnd(Document):
	platform = StringProperty()
	time = IntegerProperty()
Exemple #22
0
class DictionaryRecord(Document):
   source = StringProperty()
   target = StringProperty()
   query = StringProperty()
   word_source = StringProperty()
   date_written = DateTimeProperty()
class User(Document):
    username = StringProperty()
    real_name = StringProperty()
    salt = StringProperty()
    password = StringProperty()
    email = StringProperty()