o
    h                     @   s,   d dl mZ d dlmZ dd Zdd ZdS )    )settings)ImproperlyConfiguredc                   C   s   t tddS )z
    Get the dotted ``app.Model`` name for the document model as a string.
    Useful for developers making Wagtail plugins that need to refer to the
    document model, such as in foreign keys, but the model itself is not required.
    WAGTAILDOCS_DOCUMENT_MODELzwagtaildocs.Document)getattrr    r   r   Z/var/www/html/ndineBlogger/venv/lib/python3.10/site-packages/wagtail/documents/__init__.pyget_document_model_string   s   r   c                  C   sR   ddl m}  t }z| j|ddW S  ty   td ty(   td| w )z
    Get the document model from the ``WAGTAILDOCS_DOCUMENT_MODEL`` setting.
    Defaults to the standard ``wagtail.documents.models.Document`` model
    if no custom model is defined.
    r   )appsF)require_readyzEWAGTAILDOCS_DOCUMENT_MODEL must be of the form 'app_label.model_name'zKWAGTAILDOCS_DOCUMENT_MODEL refers to model '%s' that has not been installed)django.appsr	   r   	get_model
ValueErrorr   LookupError)r	   model_stringr   r   r   get_document_model   s   r   N)django.confr   django.core.exceptionsr   r   r   r   r   r   r   <module>   s    	