projects
/
zzz-floof.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Test suite runs and passes!
[zzz-floof.git]
/
floof
/
model
/
search.py
diff --git
a/floof/model/search.py
b/floof/model/search.py
index
7e04ae7
..
9dabd58
100644
(file)
--- a/
floof/model/search.py
+++ b/
floof/model/search.py
@@
-3,8
+3,8
@@
from elixir import *
class SavedSearch(Entity):
class SavedSearch(Entity):
- string = Field(Unicode
) # I tried calling this query, but it broke elixir
- author = ManyToOne('User')
+ string = Field(Unicode
, required=True)
+ author = ManyToOne('User'
, required=True
)
fork = ManyToOne("SavedSearch")
def __unicode__(self):
fork = ManyToOne("SavedSearch")
def __unicode__(self):
@@
-13,8
+13,8
@@
class SavedSearch(Entity):
class GalleryWidget(Entity):
class GalleryWidget(Entity):
- page = ManyToOne('UserPage')
- search = ManyToOne(SavedSearch)
+ page = ManyToOne('UserPage'
, required=True
)
+ search = ManyToOne(SavedSearch
, required=True
)
def __init__(self, string=None, **kwargs):
owner = kwargs.get('owner', None)
def __init__(self, string=None, **kwargs):
owner = kwargs.get('owner', None)
@@
-45,4
+45,4
@@
class GalleryWidget(Entity):
# # TODO: may have to refactor this into an init if the key ordering is inconvenienc
# raise "Oh no! This gallery needs a displayer to set on the saved search."
# # TODO: may have to refactor this into an init if the key ordering is inconvenienc
# raise "Oh no! This gallery needs a displayer to set on the saved search."
- self.search = SavedSearch(author=getattr(self,
"author",
None), string=value)
+ self.search = SavedSearch(author=getattr(self,
"author",
None), string=value)