displaying galleries on your page works
[zzz-floof.git] / floof / model / users.py
1 #
2 # floof/floof/model/users.py
3 #
4 # Copyright (c) 2009 Scribblr
5 #
6
7 # from elixir import Entity, Field, Unicode, belongs_to, has_many
8 from elixir import *
9
10 class User(Entity):
11 name = Field(Unicode(20))
12 uploads = OneToMany('Art')
13 has_many('identity_urls', of_kind='IdentityURL')
14 searches = OneToMany('SavedSearch')
15 galleries = OneToMany('GalleryWidget')
16
17 def __unicode__(self):
18 return self.name
19
20 class IdentityURL(Entity):
21 url = Field(Unicode(255))
22 belongs_to('user', of_kind='User')
23