1. Cesar Canassa
  2. Zinaflow

Source

Zinaflow / zinaflow / managers.py

# -*- coding: utf-8 -*-
from django.db import models


class StateManager(models.Manager):
    def get_by_natural_key(self, name, workflow_name):
        return self.get(name=name,
                        workflow__name=workflow_name)


class WorkflowManager(models.Manager):
    def get_by_natural_key(self, name):
        return self.get(name=name)