from search import GalleryWidget
class User(Entity):
- name = Field(Unicode(20), unique=True)
- display_name = Field(Unicode(20))
+ name = Field(Unicode(20), unique=True, required=True)
+ display_name = Field(Unicode(20), required=True)
uploads = OneToMany('Art')
has_many('identity_urls', of_kind='IdentityURL')
searches = OneToMany('SavedSearch')
prepositions = ['by','for','of']
for preposition in prepositions:
GalleryWidget(page=self.primary_page, string=preposition+":me", owner=self)
-
+
#UserPage.clone_primary_template(self)
class IdentityURL(Entity):
- url = Field(Unicode(255))
- belongs_to('user', of_kind='User')
+ url = Field(Unicode(255), required=True)
+ user = ManyToOne('User', required=True)
from copy import copy
to users.
"""
- user = ManyToOne('User')
- target_user = ManyToOne('User')
+ user = ManyToOne('User', required=True)
+ target_user = ManyToOne('User', required=True)
type = Field(Integer) # UserRelationshipTypes above