(cls, domain, doc_id, additional_doc_types=None)
Gets a document and enforces its domain and doc type.
    Raises Http404 if the doc isn't found or domain/doc_type don't match.
Gets a document and enforces its domain and doc type.
    Raises Http404 if the doc isn't found or domain/doc_type don't match.
Gets a document and enforces its domain and doc type . Raises Http404 if the doc isn t found or domain / doc_type don t match .
def get_document_or_404(cls, domain, doc_id, additional_doc_types=None):
    """
    Gets a document and enforces its domain and doc type.
    Raises Http404 if the doc isn't found or domain/doc_type don't match.
    """
    try:
        return get_document_or_not_found(
            cls, domain, doc_id, additional_doc_types=additional_doc_types)
    except DocumentNotFound as e:
        raise Http404("{}\n\n{}".format(e, traceback.format_exc()))
def get_document_or_404 ( cls , domain , doc_id , additional_doc_types = None ) : try : return get_document_or_not_found ( cls , domain , doc_id , additional_doc_types = additional_doc_types ) except DocumentNotFound as e : raise Http404 ( "{}\n\n{}" . format ( e , traceback . format_exc ( ) ) )