projects
/
zzz-floof.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
merged in comments
[zzz-floof.git]
/
floof
/
model
/
art.py
diff --git
a/floof/model/art.py
b/floof/model/art.py
index
c21c74a
..
8b328d8
100644
(file)
--- a/
floof/model/art.py
+++ b/
floof/model/art.py
@@
-12,6
+12,7
@@
from pylons import config
from floof.lib.file_storage import get_path, save_file
from floof.lib.dbhelpers import find_or_create, update_or_create
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))
class Art(Entity):
title = Field(Unicode(120))
@@
-20,6
+21,7
@@
class Art(Entity):
uploader = ManyToOne('User', required=True)
tags = OneToMany('Tag')
uploader = ManyToOne('User', required=True)
tags = OneToMany('Tag')
+ discussion = ManyToOne('Discussion')
def set_file(self, file):
self.hash = save_file("art", file)
def set_file(self, file):
self.hash = save_file("art", file)
@@
-95,5
+97,15
@@
class Rating(Entity):
options = {-1:"sucks", 0:"undecided", 1:"good", 2:"great"}
default = 0
options = {-1:"sucks", 0:"undecided", 1:"good", 2:"great"}
default = 0
-
Rating.reverse_options = dict (zip(Rating.options.values(), Rating.options.keys()))
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