+ searches = OneToMany('SavedSearch')
+ # galleries = OneToMany('GalleryWidget')
+ pages = OneToMany('UserPage', inverse="owner")
+ primary_page = OneToOne('UserPage', inverse="owner")
+
+
+ def __unicode__(self):
+ return self.name
+
+ def __init__(self, **kwargs):
+ super(User, self).__init__(**kwargs)
+
+
+
+ # TODO: have this clone a standard starter page
+ self.primary_page = UserPage(owner=self, title="default", visible=True)
+
+ # a starter gallery, just for fun
+ gallery = GalleryWidget(owner=self, string="awesome")
+ self.primary_page.galleries.append(gallery)
+