Changeset 5 for bitstructures

Show
Ignore:
Timestamp:
08/07/07 20:33:20 (17 months ago)
Author:
simon
Message:

Using MEDIA_URL.

Location:
bitstructures/trunk/substructure
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • bitstructures/trunk/substructure/templates/substructure/base.html

    r2 r5  
    33<head> 
    44<title>{% block title %}Bitstructures{% endblock %}</title> 
    5 <link rel="stylesheet" href="/css/bitstructures.css" type="text/css"/> 
     5<link rel="stylesheet" href="{{ MEDIA_URL }}css/bitstructures.css" type="text/css"/> 
    66</head> 
    77 
    88<body> 
    99 
    10 <div id="nameplate"><a href="/"><img src="/images/bitstructures4.gif" 
     10<div id="nameplate"><a href="/"><img src="{{ MEDIA_URL }}images/bitstructures4.gif" 
    1111alt="Bitstructures"></a></div> 
    1212 
  • bitstructures/trunk/substructure/views.py

    r2 r5  
    22from django.shortcuts import get_object_or_404, render_to_response 
    33from bitstructures.substructure.models import Entry 
     4import settings 
    45 
    56def blog(request): 
    67    entry_list = Entry.objects.filter(date__isnull=False, is_public=True).order_by('-date') 
    78    return render_to_response('substructure/blog.html', 
    8                               { 'entry_list': entry_list }) 
     9                              { 'MEDIA_URL': settings.MEDIA_URL, 
     10                                'entry_list': entry_list }) 
    911 
    1012def dated_entry_page(request, year, month, slug): 
     
    1820    if int(month) != entry.date.month: 
    1921        raise Http404 
    20     return render_to_response('substructure/entry_page.html', {'entry': entry}) 
     22    return render_to_response('substructure/entry_page.html', 
     23                              { 'MEDIA_URL': settings.MEDIA_URL, 
     24                                'entry': entry }) 
    2125 
    2226def undated_entry_page(request, slug): 
     
    2630    if entry.date: 
    2731        raise Http404 
    28     return render_to_response('substructure/entry_page.html', {'entry': entry}) 
     32    return render_to_response('substructure/entry_page.html', 
     33                              { 'MEDIA_URL': settings.MEDIA_URL, 
     34                                'entry': entry })