# Path: cloudkittydashboard/api/cloudkitty.py
# def cloudkittyclient(request):
# def identify(what, name=False, key=None):


from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from horizon import tables
from cloudkittydashboard.api import cloudkitty as api
                u"Disable Module",
                u"Disable Modules",
                count
            ),
        )

    @staticmethod
    def action_past(count):
        return (
            ungettext_lazy(
                u"Enabled Module",
                u"Enabled Modules",
                count
            ),
            ungettext_lazy(
                u"Disabled Module",
                u"Disabled Modules",
                count
            ),
        )

    def allowed(self, request, module=None):
        self.enabled = module.get('enabled')
        if self.enabled:
            self.current_present_action = DISABLE
        else:
            self.current_present_action = ENABLE
        return True

    def action(self, request, obj_id):

# Path: cloudkittydashboard/api/cloudkitty.py
# def cloudkittyclient(request):
# def identify(what, name=False, key=None):


# Path: cloudkittydashboard/dashboards/admin/modules/tables.py
from django.urls import reverse
from django.utils.translation import ugettext_lazy as _
from django.utils.translation import ungettext_lazy
from horizon import tables
from cloudkittydashboard.api import cloudkitty as api

                u"Disable Module",
                u"Disable Modules",
                count
            ),
        )

    @staticmethod
    def action_past(count):
        return (
            ungettext_lazy(
                u"Enabled Module",
                u"Enabled Modules",
                count
            ),
            ungettext_lazy(
                u"Disabled Module",
                u"Disabled Modules",
                count
            ),
        )

    def allowed(self, request, module=None):
        self.enabled = module.get('enabled')
        if self.enabled:
            self.current_present_action = DISABLE
        else:
            self.current_present_action = ENABLE
        return True

    def action(self, request, obj_id):

        client = api.cloudkittyclient(request)