Beispiel #1
0
def documentation_view(request):
    """
    Generic documentation view. Generates documentation
    from the handlers you've defined.
    """
    docs = [ ]

    for handler, (model, anonymous) in typemapper.iteritems():
        docs.append(generate_doc(handler))
        
    return render_to_response('documentation.html', 
        { 'docs': docs }, RequestContext(request))
Beispiel #2
0
def documentation_view(request):
    """
    Generic documentation view. Generates documentation
    from the handlers you've defined.
    """
    docs = [ ]

    for handler, (model, anonymous) in typemapper.iteritems():
        docs.append(generate_doc(handler))
        
    return render_to_response('documentation.html', 
        { 'docs': docs }, RequestContext(request))
Beispiel #3
0
def documentation_view(request):
    """
    Generic documentation view. Generates documentation
    from the handlers you've defined.
    """
    docs = [ ]
    
    issuedoc = generate_doc(IssueList)
    issuedoc.url = reverse("api_sort_order", args=["new"])
    docs.append(issuedoc)
    tagcloud = generate_doc(TagCloudHandler)
    tagcloud.url = reverse("api_tagcloud")
    docs.append(tagcloud)

    for handler, (model, anonymous) in typemapper.iteritems():
        docs.append(generate_doc(handler))

    def _compare( doc1 , doc2 ):
        return cmp(doc1.name, doc2.name)    
 
    docs.sort(_compare)

    return render_to_response('documentation.html', 
        { 'docs': docs }, RequestContext(request))
Beispiel #4
0
def documentation_view(request):
    """
    Generic documentation view. Generates documentation
    from the handlers you've defined.
    """
    docs = []

    issuedoc = generate_doc(IssueList)
    issuedoc.url = reverse("api_sort_order", args=["new"])
    docs.append(issuedoc)
    tagcloud = generate_doc(TagCloudHandler)
    tagcloud.url = reverse("api_tagcloud")
    docs.append(tagcloud)

    for handler, (model, anonymous) in typemapper.iteritems():
        docs.append(generate_doc(handler))

    def _compare(doc1, doc2):
        return cmp(doc1.name, doc2.name)

    docs.sort(_compare)

    return render_to_response('documentation.html', {'docs': docs},
                              RequestContext(request))
Beispiel #5
0
def get_handler(model, anonymous):
    """Find the Piston handler for a given model"""
    for klass, (km, is_anon) in typemapper.iteritems():
        if model is km and is_anon is anonymous:
            return klass