from floof.lib.file_storage import get_path, save_file
from floof.lib.dbhelpers import find_or_create, update_or_create
+import floof.model.comments
class Art(Entity):
title = Field(Unicode(120))
uploader = ManyToOne('User', required=True)
tags = OneToMany('Tag')
+ discussion = ManyToOne('Discussion')
def set_file(self, file):
self.hash = save_file("art", file)
options = {-1:"sucks", 0:"undecided", 1:"good", 2:"great"}
default = 0
-
Rating.reverse_options = dict (zip(Rating.options.values(), Rating.options.keys()))
+
+
+
+class UserRelation(Entity):
+ related = ManyToOne("User")
+ art = ManyToOne("Art")
+ type = Field(String) # by for of
+
+
+# class CharacterRelation(Entity):
+# pass