#views.py
def Owners(request):
return render_to_response('base.html')
#urls.py
urlpatterns = patterns('owners.views',
url(r'^$', 'Owners'),
)
</sourse>
from django.shortcuts import render, get_object_or_404
def someview(request, slug=None):
some_obj =
return render(
request,
'someapp/someobject_detail.html',
{
'object': get_object_or_404(SomeObject, slug=slug),
'funky_page': True, # <--
}
)
<link href='{{ STATIC_URL }}css/style.css' rel='stylesheet' type='text/css'>
...
<li{% if funky_page %} class="funky"{% endif %}"></li>
...
li.funky { background-color: red; }