projects
/
zzz-floof.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fixed setup.py.
[zzz-floof.git]
/
floof
/
model
/
art.py
diff --git
a/floof/model/art.py
b/floof/model/art.py
index
9ff00c5
..
b709610
100644
(file)
--- a/
floof/model/art.py
+++ b/
floof/model/art.py
@@
-16,9
+16,9
@@
from floof.lib.dbhelpers import find_or_create, update_or_create
class Art(Entity):
title = Field(Unicode(120))
original_filename = Field(Unicode(120))
class Art(Entity):
title = Field(Unicode(120))
original_filename = Field(Unicode(120))
- hash = Field(String)
+ hash = Field(String
, unique=True, required=True
)
- uploader = ManyToOne('User')
+ uploader = ManyToOne('User'
, required=True
)
tags = OneToMany('Tag')
# def __init__(self, **kwargs):
tags = OneToMany('Tag')
# def __init__(self, **kwargs):
@@
-33,6
+33,7
@@
class Art(Entity):
def set_file(self, file):
self.hash = save_file("art", file)
def set_file(self, file):
self.hash = save_file("art", file)
+ self.original_filename = file.filename
file = property(get_path, set_file)
file = property(get_path, set_file)