# Path: respite/urls/routes.py
# def route(regex, view, method, name):
#     def __init__(self, regex, view, method, name):
# class _Route(object):


import inspect
from functools import wraps
from django.http import HttpResponse
from respite.urls import routes
    """
    Override the views class' supported formats for the decorated function.

    Arguments:
    formats -- A list of strings describing formats, e.g. ``['html', 'json']``.
    """
    def decorator(function):
        @wraps(function)
        def wrapper(self, *args, **kwargs):
            self.supported_formats = formats
            return function(self, *args, **kwargs)
        return wrapper
    return decorator

def route(regex, method, name):
    """
    Route the decorated view.

    :param regex: A string describing a regular expression to which the request path will be matched.
    :param method: A string describing the HTTP method that this view accepts.
    :param name: A string describing the name of the URL pattern.
    
    ``regex`` may also be a lambda that accepts the parent resource's ``prefix`` argument and returns
    a string describing a regular expression to which the request path will be matched.
    
    ``name`` may also be a lambda that accepts the parent resource's ``views`` argument and returns
    a string describing the name of the URL pattern.
    """

    def decorator(function):

# Path: respite/urls/routes.py
# def route(regex, view, method, name):
#     def __init__(self, regex, view, method, name):
# class _Route(object):


# Path: respite/decorators.py
import inspect
from functools import wraps
from django.http import HttpResponse
from respite.urls import routes

    """
    Override the views class' supported formats for the decorated function.

    Arguments:
    formats -- A list of strings describing formats, e.g. ``['html', 'json']``.
    """
    def decorator(function):
        @wraps(function)
        def wrapper(self, *args, **kwargs):
            self.supported_formats = formats
            return function(self, *args, **kwargs)
        return wrapper
    return decorator

def route(regex, method, name):
    """
    Route the decorated view.

    :param regex: A string describing a regular expression to which the request path will be matched.
    :param method: A string describing the HTTP method that this view accepts.
    :param name: A string describing the name of the URL pattern.
    
    ``regex`` may also be a lambda that accepts the parent resource's ``prefix`` argument and returns
    a string describing a regular expression to which the request path will be matched.
    
    ``name`` may also be a lambda that accepts the parent resource's ``views`` argument and returns
    a string describing the name of the URL pattern.
    """

    def decorator(function):

        function.route = routes.route(