Django

Code

Changeset 2324

Show
Ignore:
Timestamp:
02/17/06 12:06:45 (3 years ago)
Author:
adrian
Message:

magic-removal: Merged to [2323]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • django/branches/magic-removal/django/forms/__init__.py

    r1989 r2324  
    468468            if str(value) == str_data: 
    469469                selected_html = ' selected="selected"' 
    470             output.append('    <option value="%s"%s>%s</option>' % (escape(value), selected_html, display_name)) 
     470            output.append('    <option value="%s"%s>%s</option>' % (escape(value), selected_html, escape(display_name))) 
    471471        output.append('  </select>') 
    472472        return '\n'.join(output) 
  • django/branches/magic-removal/django/views/generic/date_based.py

    r2304 r2324  
    8787    Context: 
    8888        month: 
    89             this month 
     89            (date) this month 
     90        next_month: 
     91            (date) the first day of the next month, or None if the next month is in the future 
     92        previous_month: 
     93            (date) the first day of the previous month 
    9094        object_list: 
    9195            list of objects published in the given month 
     
    117121        'object_list': object_list, 
    118122        'month': date, 
     123        'next_month': (last_day < datetime.date.today()) and (last_day + datetime.timedelta(days=1)) or None, 
     124        'previous_month': first_day - datetime.timedelta(days=1), 
    119125    }, context_processors) 
    120126    for key, value in extra_context.items(): 
  • django/branches/magic-removal/django/views/static.py

    r1949 r2324  
    5757    <meta http-equiv="Content-Language" content="en-us" /> 
    5858    <meta name="robots" content="NONE,NOARCHIVE" /> 
    59     <title>Index of {{ directory }}</title> 
     59    <title>Index of {{ directory|escape }}</title> 
    6060  </head> 
    6161  <body> 
    62     <h1>Index of {{ directory }}</h1> 
     62    <h1>Index of {{ directory|escape }}</h1> 
    6363    <ul> 
    6464      {% for f in file_list %} 
    65       <li><a href="{{ f }}">{{ f }}</a></li> 
     65      <li><a href="{{ f|urlencode }}">{{ f|escape }}</a></li> 
    6666      {% endfor %} 
    6767    </ul> 
  • django/branches/magic-removal/docs/generic_views.txt

    r2320 r2324  
    191191 
    192192        ``month`` 
    193             The given month (a datetime.datetime object) 
     193            The given month (a datetime.date object) 
     194        ``next_month`` 
     195            **New in Django development version.** The first day of the next 
     196            month, or None if the next month is in the future (a datetime.date 
     197            object) 
     198        ``previous_month`` 
     199            **New in Django development version.** The first day of the 
     200            previous month (a datetime.date object) 
    194201        ``object_list`` 
    195202            List of objects published in the given month