o
    ѷ6i$                     @  s   d Z ddlmZ ddlmZ ddlmZ ddlmZ ddlm	Z	 ddl
mZ ddlmZ d	ZdZd
ZdZeddG dd dZe ZdS )ad  
These are the available settings, accessed through ``django_nyt.conf.app_settings``.
All attributes prefixed ``NYT_*`` can be overridden from your Django project's settings module by defining a setting with the same name.

For instance, to enable the admin, add the following to your project settings:

.. code-block:: python

    NYT_ENABLE_ADMIN = True
    )annotations)OrderedDict)	dataclass)field)Any)settings)gettext_lazyNYT_id  i%  T)frozenc                      s,  e Zd ZU dZdZded< 	 dZded< 	 dZded	< 	 d
Zded< 	 dZ	ded< 	 dZ
ded< 	 dZded< 	 eedZded< 	 eedZded< 	 eedfeedfeedffZded< 	 eZded< 	 eeddZded< 	 d ejv oeed!d Zded"< 	 d#Zded$< d* fd(d)Z  ZS )+AppSettingsz9Access this instance as ``django_nyt.conf.app_settings``.nytstrNYT_DB_TABLE_PREFIXFboolNYT_ENABLE_ADMINTNYT_SEND_EMAILSNNYT_EMAIL_SUBJECTznotifications@example.comNYT_EMAIL_SENDERz notifications/emails/default.txtNYT_EMAIL_TEMPLATE_DEFAULTz(notifications/emails/default_subject.txt"NYT_EMAIL_SUBJECT_TEMPLATE_DEFAULT)default_factorydictNYT_EMAIL_TEMPLATE_NAMES NYT_EMAIL_SUBJECT_TEMPLATE_NAMES	instantlydailyweeklyz.list[tuple[int, Any]] | tuple[tuple[int, Any]]NYT_INTERVALSintNYT_INTERVALS_DEFAULTAUTH_USER_MODELz	auth.UserNYT_USER_MODELchannelsNYT_CHANNELS_DISABLENYT_ENABLE_CHANNELSznyt_all-{notification_key:s}NYT_NOTIFICATION_CHANNEL_AppSettings__namereturnr   c                   s*   | trtt|rtt|S t |S )z
        Check if a Django project settings should override the app default.

        In order to avoid returning any random properties of the django settings, we inspect the prefix firstly.
        )
startswithsettings_prefixhasattrdjango_settingsgetattrsuper__getattribute__)selfr&   	__class__ T/var/www/hoanhtaovolam_webdjango/env/lib/python3.10/site-packages/django_nyt/conf.pyr.      s   
zAppSettings.__getattribute__)r&   r   r'   r   )__name__
__module____qualname____doc__r   __annotations__r   r   r   r   r   r   r   r   r   r   	INSTANTLY_DAILYWEEKLYr   r   r,   r+   r!   INSTALLED_APPSr$   r%   r.   __classcell__r2   r2   r0   r3   r      sF   
 




r   N)r7   
__future__r   collectionsr   dataclassesr   r   typingr   django.confr   r+   django.utils.translationr   r:   r)   r9   r;   r<   r   app_settingsr2   r2   r2   r3   <module>   s    

q