# Path: achilles/actions.py
# class Library(BaseLibrary):
#     def __init__(self, namespace=None):
#     def _register(self, func, name=None):
#         def wrapper(transport, *args, **kwargs):
# def get(name):
# def run_actions(transport, actions):
# def render(transport):
# 
# Path: achilles/blocks.py
# class Library(BaseLibrary):
#         class B(Block):
# class Block(object):
#     def __init__(self, namespace=None):
#     def register(self, name=None):
#     def block(self, name=None, template_name=None, takes_context=False):
#         def dec(name):
#     def _create_class(self, func):
#             def get_context_data(self, *args, **kwargs):
# def get(name, context=None):
#     def __init__(self, context):
#     def render(self, *args, **kwargs):
#     def get_context_data(self, *args, **kwargs):
#     def update(self, transport, *args, **kwargs):
# def update(transport, name, *args, **kwargs):
# def render(transport):
# 
# Path: achilles/console.py
# def log(transport, msg):
# def render(transport):


from django.contrib import messages
from achilles import actions, blocks, console



register = actions.Library('example')

@register.action
def multiply(transport, a, b):
    messages.info(request, 'Multiplication done')
    return float(a) * float(b)

@register.action
def divide(transport, a, b):
    messages.info(request, 'Division done')
    return float(a) / float(b)

@register.action
def log(transport):
    messages.info(request, 'Check your browser console')

# Path: achilles/actions.py
# class Library(BaseLibrary):
#     def __init__(self, namespace=None):
#     def _register(self, func, name=None):
#         def wrapper(transport, *args, **kwargs):
# def get(name):
# def run_actions(transport, actions):
# def render(transport):
# 
# Path: achilles/blocks.py
# class Library(BaseLibrary):
#         class B(Block):
# class Block(object):
#     def __init__(self, namespace=None):
#     def register(self, name=None):
#     def block(self, name=None, template_name=None, takes_context=False):
#         def dec(name):
#     def _create_class(self, func):
#             def get_context_data(self, *args, **kwargs):
# def get(name, context=None):
#     def __init__(self, context):
#     def render(self, *args, **kwargs):
#     def get_context_data(self, *args, **kwargs):
#     def update(self, transport, *args, **kwargs):
# def update(transport, name, *args, **kwargs):
# def render(transport):
# 
# Path: achilles/console.py
# def log(transport, msg):
# def render(transport):


# Path: example/achillesexample/actions.py
from django.contrib import messages
from achilles import actions, blocks, console




register = actions.Library('example')

@register.action
def multiply(transport, a, b):
    messages.info(request, 'Multiplication done')
    return float(a) * float(b)

@register.action
def divide(transport, a, b):
    messages.info(request, 'Division done')
    return float(a) / float(b)

@register.action
def log(transport):
    messages.info(request, 'Check your browser console')

    console.log(transport, "This is a message from the server!")