def _fake_logentry(self, instance_id, user, text, model=Page):
LogEntry.objects.log_action(
user_id=user.id,
content_type_id=ContentType.objects.get_for_model(model).pk,
object_id=instance_id,
object_repr=text,
action_flag=CHANGE,
)
entry = LogEntry.objects.filter(user=user, object_id=instance_id, action_flag__in=(CHANGE,))[0]
session = self.client.session
session['cms_log_latest'] = entry.pk
session.save()
评论列表
文章目录