On Mon, 2007-05-21 at 19:17 +0000, Val wrote:
> 
> DEFAULT_DIRECTORY_INDEX_TEMPLATE = """
> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://
> www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
> <html xmlns="http://www.w3.org/1999/xhtml"; xml:lang="en" lang="en">
>   <head>
>     <meta http-equiv="Content-type" content="text/html;
> charset=utf-8" />
>     <meta http-equiv="Content-Language" content="en-us" />
>     <meta name="robots" content="NONE,NOARCHIVE" />
>     <title>Index of {{ directory|escape }}</title>
>   </head>
>   <body>
>     <h1>Index of {{ directory|escape }}</h1>
>     <ul>
>       {% for f in file_list %}
>       <li><a href="{{ f|urlencode }}">{{ f|escape }}</a></li>
>       {% endfor %}
>     </ul>
>   </body>
> </html>
> """
> 
> What exactly are the pipes doing in this html?  I am trying to write a
> template that will display information about the files in my DB than
> their names.  For example, I want it to also show the date last
> modified.  I can see in the function that is calling the template that
> it is passing the mod date as well as the size of each file.  For some
> reason, they aren't coded into the template.  I guess what I'm trying
> to say is that I want to show the name, size, and mod date of the
> files in my db, and I don't understand the syntax included in the
> default template (I just ripped the above code from
> django.views.static).  Can someone enlighten me?

It sounds like you haven't read the template documentation:

http://www.djangoproject.com/documentation/templates/

That explains all about variable access, filters and the syntax.

Regards,
Malcolm



--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to