Verified Commit a08ddade authored by guglielmo's avatar guglielmo

notifications count only contents for which verification is enabled

parent c6a390a7
......@@ -27,7 +27,7 @@ RESOURCES_PATH = ROOT_PATH.path("resources")
# Add our project to our python path, this way we don't need to type our project
# name in our dotted import paths:
# os.path.append(PROJECT_PATH)
# sys.path.append(PROJECT_PATH)
# READ ENVIRON
# -----------------------------------------------------------------------------
......
......@@ -35,14 +35,16 @@ class Command(LoggingBaseCommand):
"""
self.setup_logger(__name__, formatter_key="simple", **options)
contents = Content.objects.filter(is_verification_enabled=True)
context = {
'config': config,
'domain': Site.objects.get_current().domain,
'n_analysed_contents': Content.objects.count(),
'modified_contents': Content.objects.filter(verification_status=Content.STATUS_CHANGED),
'failed_contents': Content.objects.filter(verification_status=Content.STATUS_ERROR),
'n_modified_contents': Content.objects.filter(verification_status=Content.STATUS_CHANGED).count(),
'n_failed_contents': Content.objects.filter(verification_status=Content.STATUS_ERROR).count(),
'n_analysed_contents': contents.count(),
'modified_contents': contents.filter(verification_status=Content.STATUS_CHANGED),
'failed_contents': contents.filter(verification_status=Content.STATUS_ERROR),
'n_modified_contents': contents.filter(verification_status=Content.STATUS_CHANGED).count(),
'n_failed_contents': contents.filter(verification_status=Content.STATUS_ERROR).count(),
}
summary_txt = \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment