from django.conf.urls import patterns, url
urlpatterns = patterns('blog.views', url('^blog/(?P<year>\\d{4})/$',
    'year_archive', {'foo': 'bar'}))

def year_archive(request, year, foo=None):
    pass
Django url parameter passing