
    Bhj                        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  G d de      Z G d	 d
ej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Z G d dej                        Zy)    )cached_property)models)reverse)MP_Node)PlaceholderRelationField)get_placeholder_from_slotc                       e Zd Z ej                  dddej
                        Z ej                  d      Z e	       Z
ed        Zd Zd Z G d	 d
      Zy)CategoryselfT)blanknull	on_delete   
max_lengthc                 2    t        | j                  dd      S )NdescriptioniX  )default_width)r   placeholdersr   s    W/home/dcms/DCMS/lib/python3.12/site-packages/cms/test_utils/project/sampleapp/models.pyr   zCategory.description   s    ():):MY\]]    c                     | j                   S )N)namer   s    r   __str__zCategory.__str__   s    yyr   c                 2    t        d| j                  g      S )Ncategory_view)args)r   pkr   s    r   get_absolute_urlzCategory.get_absolute_url   s    dggY77r   c                       e Zd ZdZy)Category.Meta
categoriesN)__name__
__module____qualname__verbose_name_plural r   r   Metar"      s    *r   r)   N)r$   r%   r&   r   
ForeignKeyCASCADEparent	CharFieldr   r   r   r   r   r   r    r)   r(   r   r   r
   r
      s`    VvTWF6r*D+-L^ ^8+ +r   r
   c                   n    e Zd Z ej                  d      Z ej                  eej                        Z	y)Picturepictures)	upload_tor   N)
r$   r%   r&   r   
ImageFieldimager*   r
   r+   categoryr(   r   r   r/   r/      s,    F
3E v  V^^DHr   r/   c                   6    e Zd Z ej                  ddd      Zy)SampleAppConfigNd   T)defaultr   unique)r$   r%   r&   r   r-   	namespacer(   r   r   r7   r7   #   s       Ir   r7   c                       e Zd Zy)SomeEditableModelN)r$   r%   r&   r(   r   r   r=   r=   +   s    r   r=   c                   \    e Zd Z ej                  dd      Z ej                  dd      Zy)GrouperModel    r   r9   N)r$   r%   r&   r   r-   category_name
some_fieldr(   r   r   r?   r?   /   s*    $F$$R@M!!!S"=Jr   r?   c                       e Zd Z ej                  eej                        Z ej                  dd      Z	 ej                  ddd      Z
 ej                  d	d
      Z ej                  d      Zy)GrouperModelContentr2   en)rG   English)deGerman)itItalianr9   choicesworld
   )rP   World)americasAmericas)europeEurope)africaAfrica)asiaAsia)	australia	Australiar9   r   rO   Yes/NoFverbose_namer9   r8   r   N)r$   r%   r&   r   r*   r?   r+   grouper_model	TextFieldlanguageregionBooleanFielduptodatesecret_greetingr(   r   r   rF   rF   4   s    %F%%..M
  v
H V
F #v""H
 'f&&Or   rF   c                   4    e Zd Z ej                  dd      Zy)SimpleGrouperModelr@   rA   rB   N)r$   r%   r&   r   r-   rC   r(   r   r   rj   rj   [   s    $F$$R@Mr   rj   c                       e Zd Z ej                  eej                        Z ej                  dd      Z	 ej                  ddd      Z
 ej                  d	d
      Z ej                  d      Zy)SimpleGrouperModelContentr2   rG   rH   rN   rP   rQ   rR   r^   r_   Fr`   r8   r   N)r$   r%   r&   r   r*   rj   r+   simple_grouper_modelrc   rd   re   rf   rg   rh   r(   r   r   rl   rl   _   s    ,6,,..
  v
H V
F #v""H
 'f&&Or   rl   N)	functoolsr   	django.dbr   django.urlsr   treebeard.mp_treer   cms.models.fieldsr   cms.utils.placeholderr   r
   Modelr/   r7   r=   r?   rF   rj   rl   r(   r   r   <module>ru      s    %   % 6 ;+w +&Efll E
fll 	 	>6<< >
$&,, $NA A$ $r   