Пример #1
0
 def setUp(self):
     if not hasattr(StateLog, 'pending_objects'):
         StateLog.add_to_class('pending_objects', PendingStateLogManager())
     self.article = Article.objects.create(state='draft')
     self.user = User.objects.create_user(username='******', password='******')
     self.create_kwargs = {
         'by': self.user,
         'state': 'submitted',
         'transition': 'submit',
         'content_object': self.article
     }
Пример #2
0
def pending_objects(db, request):
    if 'pending_objects' in request.keywords:
        if not hasattr(StateLog, 'pending_objects'):
            StateLog.add_to_class('pending_objects', PendingStateLogManager())
Пример #3
0
def pending_objects(db, request):
    if "pending_objects" in request.keywords:
        if not hasattr(StateLog, "pending_objects"):
            StateLog.add_to_class("pending_objects", PendingStateLogManager())