U
    ±[Öe[  ã                   @   sD   d Z ddlmZ ddlmZmZ G dd„ deƒZG dd„ deƒZd	S )
zÃ
    pyexcel.plugins.sources.django
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Representation of django sources

    :copyright: (c) 2015-2022 by Onni Software Ltd.
    :license: New BSD License
é    )Ú	DB_DJANGOé   )ÚBookDbSourceÚSheetDbSourcec                   @   s*   e Zd ZdZd	dd„Zdd„ Zdd„ ZdS )
ÚSheetDjangoSourcez%
    Django model as data source
    Nc                 K   s$   || _ tj| tf||dœ|—Ž d S )N)Úexport_columnsÚ
sheet_name)Ú_SheetDjangoSource__modelr   Ú__init__r   )ÚselfÚmodelr   r   Úkeywords© r   ú`/var/www/html/services/stratfitenv/lib/python3.8/site-packages/pyexcel/plugins/sources/django.pyr
      s    þüûzSheetDjangoSource.__init__c                 C   s   | j gS ©N©r	   ©r   r   r   r   Úget_export_params   s    z#SheetDjangoSource.get_export_paramsc                 C   s   | j S r   r   r   r   r   r   Úget_import_params"   s    z#SheetDjangoSource.get_import_params)NNN)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r
   r   r   r   r   r   r   r      s        ÿ
r   c                   @   s    e Zd ZdZdd„ Zdd„ ZdS )ÚBookDjangoSourcez.
    multiple Django table as data source
    c                 K   s   || _ tj| tf|Ž d S r   )Ú_BookDjangoSource__modelsr   r
   r   )r   Úmodelsr   r   r   r   r
   +   s    zBookDjangoSource.__init__c                 C   s   | j S r   )r   r   r   r   r   Ú
get_params/   s    zBookDjangoSource.get_paramsN)r   r   r   r   r
   r   r   r   r   r   r   &   s   r   N)r   Zpyexcel_io.constantsr   Z
db_sourcesr   r   r   r   r   r   r   r   Ú<module>   s   	