Model document decorator to register its design document view::

        @register_view('dev_books')
        class Book(Document):
            __bucket_name__ = 'mybucket'
            doc_type = 'book'
            structure = {
                # snip snip
            }

    :param design_doc: The name of the design document.
    :type design_doc: basestring
    :param full_set: Attach full_set param to development views.
    :type full_set: bool

def register_view(design_doc, full_set=True):
    """Model document decorator to register its design document view::

        @register_view('dev_books')
        class Book(Document):
            __bucket_name__ = 'mybucket'
            doc_type = 'book'
            structure = {
                # snip snip
            }

    :param design_doc: The name of the design document.
    :type design_doc: basestring
    :param full_set: Attach full_set param to development views.
    :type full_set: bool
    """
    def _injector(doc):
        if not isinstance(doc, type) or not issubclass(doc, Document):
            raise TypeError("Class must be a cbwrapper 'Document' subclass.")
        doc.__view_name__ = design_doc
        doc.full_set = full_set
        ViewSync._documents.add(doc)
        return doc
    return _injector