tcms.core.helpers.comments module

Functions that help access comments of objects.

tcms.core.helpers.comments.add_comment(objs, comments, user, submit_date=None)[source]

Add django.comment for an object.

  • objs (list) – List of object to which to add comments
  • comments (str) – The commentary
  • user (A User model) – Who is adding this
  • submit_date (datetime.datetime) – A time stamp


from django.contrib.auth.models import User
testuser = User.objects.get(email='')
from tcms.testruns.models import TestExecution
testrun = TestExecution.objects.get(pk=171675)
comments = 'stupid comments by Homer'
add_comment([testrun,], comments, testuser)