HEX
Server: Apache
System: Linux pdx1-shared-a1-38 6.6.104-grsec-jammy+ #3 SMP Tue Sep 16 00:28:11 UTC 2025 x86_64
User: mmickelson (3396398)
PHP: 8.1.31
Disabled: NONE
Upload Files
File: //usr/lib/python3/dist-packages/django/contrib/flatpages/__pycache__/views.cpython-310.pyc
o

�a�
�@s�ddlmZddlmZddlmZddlmZmZm	Z	ddl
mZddlm
Z
ddlmZddlmZd	Zd
d�Zedd
��ZdS)�)�settings)�FlatPage)�get_current_site)�Http404�HttpResponse�HttpResponsePermanentRedirect)�get_object_or_404)�loader)�	mark_safe)�csrf_protectzflatpages/default.htmlcCs�|�d�s	d|}t|�j}z	tt||d�}Wn$ty;|�d�s:tjr:|d7}tt||d�}t	d|j
�YS�wt||�S)a3
    Public interface to the flat page view.

    Models: `flatpages.flatpages`
    Templates: Uses the template defined by the ``template_name`` field,
        or :template:`flatpages/default.html` if template_name is not defined.
    Context:
        flatpage
            `flatpages.flatpages` object
    �/)�url�sitesz%s/)�
startswithr�idrrr�endswithr�APPEND_SLASHr�path�render_flatpage)�requestr
�site_id�f�r�@/usr/lib/python3/dist-packages/django/contrib/flatpages/views.py�flatpages

�
rcCsr|jr|jjsddlm}||j�S|jrt�|jt	f�}nt�
t	�}t|j�|_t|j
�|_
t|�d|i|��S)z3
    Internal interface to the flat page view.
    r)�redirect_to_loginr)�registration_required�user�is_authenticated�django.contrib.auth.viewsrr�
template_namer	�select_template�DEFAULT_TEMPLATE�get_templater
�title�contentr�render)rrr�templaterrrr0s

rN)�django.confr�django.contrib.flatpages.modelsr�django.contrib.sites.shortcutsr�django.httprrr�django.shortcutsr�django.templater	�django.utils.safestringr
�django.views.decorators.csrfrr"rrrrrr�<module>s