3
š(ƒh  ã               @   s0   d dl mZ d dlmZ eG dd„ deƒƒZdS )é    )Úunicode_literals)Úpython_2_unicode_compatiblec               @   s2   e Zd ZdZdd„ Zdd„ Zddd„Zd	d
„ ZdS )ÚRequestSitea  
    A class that shares the primary interface of Site (i.e., it has
    ``domain`` and ``name`` attributes) but gets its data from a Django
    HttpRequest object rather than from a database.

    The save() and delete() methods raise NotImplementedError.
    c             C   s   |j ƒ  | _| _d S )N)Úget_hostÚdomainÚname)ÚselfÚrequest© r
   úA/tmp/pip-install-q3hcpn_q/Django/django/contrib/sites/requests.pyÚ__init__   s    zRequestSite.__init__c             C   s   | j S )N)r   )r   r
   r
   r   Ú__str__   s    zRequestSite.__str__Fc             C   s   t dƒ‚d S )NzRequestSite cannot be saved.)ÚNotImplementedError)r   Zforce_insertZforce_updater
   r
   r   Úsave   s    zRequestSite.savec             C   s   t dƒ‚d S )NzRequestSite cannot be deleted.)r   )r   r
   r
   r   Údelete   s    zRequestSite.deleteN)FF)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   r   r   r   r
   r
   r
   r   r      s
   
r   N)Ú
__future__r   Zdjango.utils.encodingr   Úobjectr   r
   r
   r
   r   Ú<module>   s   