Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cubicweb
cubes
classifiedad
Commits
659e2a0f6c5e
Commit
544642e3
authored
Feb 13, 2010
by
Nicolas Chauvat
Browse files
[views] comment out facets
parent
ffc0c61e849f
Changes
1
Hide whitespace changes
Inline
Side-by-side
views.py
View file @
659e2a0f
...
...
@@ -82,15 +82,15 @@ class ClassifiedAdInContextView(baseviews.SameETypeListItemView):
self
.
w
(
u
'</a></div>'
)
self
.
w
(
u
'</td></tr></table>'
)
class
ClassifiedP
ubDat
eFacet
(
RangeFacet
):
__regid__
=
'classified-price-facet'
__select__
=
RangeFacet
.
__select__
&
implements
(
'ClassifiedAd'
)
rtype
=
'price'
#
class ClassifiedP
ric
eFacet(RangeFacet):
#
__regid__ = 'classified-price-facet'
#
__select__ = RangeFacet.__select__ & implements('ClassifiedAd')
#
rtype = 'price'
class
ClassifiedPubDateFacet
(
DateRangeFacet
):
__regid__
=
'classified-publication_date-facet'
__select__
=
DateRangeFacet
.
__select__
&
implements
(
'ClassifiedAd'
)
rtype
=
'publication_date'
#
class ClassifiedPubDateFacet(DateRangeFacet):
#
__regid__ = 'classified-publication_date-facet'
#
__select__ = DateRangeFacet.__select__ & implements('ClassifiedAd')
#
rtype = 'publication_date'
# find ads similar to a given ad (by comparing descriptions)
...
...
@@ -125,7 +125,7 @@ class ProximityOfAds(baseviews.EntityView):
(
self
.
_cw
.
_
(
'ClassifiedAd'
),
self
.
_cw
.
_
(
'Similar Ads'
)))
for
row
,
ad
in
enumerate
(
self
.
rset
.
entities
()):
self
.
w
(
u
'<tr class="%s"><td>'
%
(
row
%
2
and
u
'even'
or
u
'odd'
))
self
.
w
(
ad
.
view
(
'
outofcontext
'
))
self
.
w
(
ad
.
view
(
'
sameetypelistitem
'
))
self
.
w
(
u
'</td><td><ul>'
)
scores
=
[(
distances
[
mk_key
(
eid
,
ad
.
eid
)],
eid
)
for
eid
in
vectors
if
eid
!=
ad
.
eid
]
scores
.
sort
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment