
    h                     2    d dl mZ d dlmZmZ ddlmZ d Zy)    )Http404)get_object_or_404redirect   )Filec                     t        t        |d      }|j                  rt        |      |j                  k7  r&t        dt        j                  j                  z        t        |j                        S )z6
    Redirect to the current url of a public file
    T)pk	is_publiczNo %s matches the given query.)
r   r   fileintcanonical_timer   _metaobject_namer   url)requestuploaded_atfile_id
filer_files       ;/home/dcms/DCMS/lib/python3.12/site-packages/filer/views.py	canonicalr      sU     #4GtDJOOs;/:3L3LL69O9OOPPJNN##    N)django.httpr   django.shortcutsr   r   modelsr   r    r   r   <module>r      s     8 $r   