def actions(self): from cms.utils.placeholder import PlaceholderNoAction if not hasattr(self, '_actions_cache'): field = self._get_attached_field() self._actions_cache = getattr(field, 'actions', PlaceholderNoAction()) return self._actions_cache
def test_placeholder_no_action(self): actions = PlaceholderNoAction() self.assertEqual(actions.get_copy_languages(), []) self.assertFalse(actions.copy())
def actions(self): if not hasattr(self, '_actions_cache'): field = self._get_attached_field() self._actions_cache = getattr(field, 'actions', PlaceholderNoAction()) return self._actions_cache