Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
blog
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cubicweb
cubes
blog
Commits
b0b42cfa25e3
Commit
b0b42cfa25e3
authored
15 years ago
by
Sylvain Thénault
Browse files
Options
Downloads
Patches
Plain Diff
use is_in_state to avoid spurious possible views error (needs cw 3.7.3)
parent
4b93c8ae5ea2
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
__pkginfo__.py
+1
-1
1 addition, 1 deletion
__pkginfo__.py
debian/control
+1
-1
1 addition, 1 deletion
debian/control
hooks.py
+2
-4
2 additions, 4 deletions
hooks.py
with
4 additions
and
6 deletions
__pkginfo__.py
+
1
−
1
View file @
b0b42cfa
...
...
@@ -67,7 +67,7 @@
]
__depends_cubes__
=
{}
__depends__
=
{
'
cubicweb
'
:
'
>= 3.
6.0
'
}
__depends__
=
{
'
cubicweb
'
:
'
>= 3.
7.3
'
}
__use__
=
tuple
(
__depends_cubes__
)
# package ###
...
...
This diff is collapsed.
Click to expand it.
debian/control
+
1
−
1
View file @
b0b42cfa
...
...
@@ -11,7 +11,7 @@
Architecture: all
Conflicts: erudi-blog, erudi-blog-server, erudi-blog-client, erudi-blog-comp
Replaces: erudi-blog, erudi-blog-server, erudi-blog-client, erudi-blog-comp
Depends: cubicweb-common (>= 3.
6.0
)
Depends: cubicweb-common (>= 3.
7.3
)
Description: blog component for the CubicWeb framework
This CubicWeb component provides blogging functionnalities.
.
...
...
This diff is collapsed.
Click to expand it.
hooks.py
+
2
−
4
View file @
b0b42cfa
from
cubicweb.selectors
import
implements
,
score_entity
from
cubicweb.selectors
import
implements
,
is_in_state
from
cubicweb.sobjects.notification
import
NotificationView
,
StatusChangeMixIn
class
BlogEntryPublishedView
(
StatusChangeMixIn
,
NotificationView
):
"""
get notified from published blogs
"""
...
...
@@ -2,10 +2,8 @@
from
cubicweb.sobjects.notification
import
NotificationView
,
StatusChangeMixIn
class
BlogEntryPublishedView
(
StatusChangeMixIn
,
NotificationView
):
"""
get notified from published blogs
"""
__select__
=
(
implements
(
'
BlogEntry
'
,)
&
score_entity
(
lambda
x
:
x
.
latest_trinfo
().
new_state
.
name
==
'
published
'
)
)
__select__
=
implements
(
'
BlogEntry
'
,)
&
is_in_state
(
'
published
'
)
content_attr
=
'
content
'
def
subject
(
self
):
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment