
v^                 @   sm   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
 Gd d   d e j  Z d S)	    )Site)models)get_script_prefix)
iri_to_uri)gettext_lazyc            	   @   s  e  Z d  Z e j e d  d d d d Z e j e d  d d Z e j e d  d	 d Z	 e j
 e d
  d d Z e j e d  d d d	 d d e d  Z e j
 e d  d e d  d d Z e j e d e d  Z Gd d   d  Z d d   Z d d   Z d S)FlatPageURL
max_lengthd   Zdb_indexTtitle   contentZblankzenable commentsdefaultFztemplate nameF   	help_textuw   Example: “flatpages/contact_page.html”. If this isn’t provided, the system will use “flatpages/default.html”.zregistration requiredzGIf this is checked, only logged-in users will be able to view the page.verbose_namesitesc               @   s4   e  Z d  Z d Z e d  Z e d  Z d Z d S)zFlatPage.MetaZdjango_flatpagez	flat pagez
flat pagesurlN)zurl)__name__
__module____qualname__Zdb_table_r   Zverbose_name_pluralZordering r   r   A/tmp/pip-build-8lau8j11/django/django/contrib/flatpages/models.pyMeta   s   r   c             C   s   d |  j  |  j f S)Nz%s -- %s)r   r   )selfr   r   r   __str__#   s    zFlatPage.__str__c             C   s   t  t   j d  |  j  S)N/)r   r   rstripr   )r   r   r   r   get_absolute_url&   s    zFlatPage.get_absolute_urlN)r   r   r   r   Z	CharFieldr   r   r   Z	TextFieldr   ZBooleanFieldZenable_commentsZtemplate_nameZregistration_requiredZManyToManyFieldr   r   r   r   r   r   r   r   r   r      s$   !	r   N)Zdjango.contrib.sites.modelsr   Z	django.dbr   Zdjango.urlsr   Zdjango.utils.encodingr   Zdjango.utils.translationr   r   ZModelr   r   r   r   r   <module>   s
   