X-Git-Url: http://git.veekun.com/zzz-floof.git/blobdiff_plain/ea3d7fcf702e372eac978d61b9af9dbad46543bb..42398bc94b95b5a115396f14c3c1dde6fb6808a5:/floof/model/users.py diff --git a/floof/model/users.py b/floof/model/users.py index f2a6a75..6643702 100644 --- a/floof/model/users.py +++ b/floof/model/users.py @@ -11,8 +11,8 @@ from elixir import * 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') @@ -51,13 +51,13 @@ class User(Entity): 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 @@ -119,7 +119,7 @@ class UserRelationship(Entity): 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