1 from django.conf.urls.defaults import patterns, url
2 from django.http import HttpResponseRedirect
5 urlpatterns = patterns('libraries.views',
6 url(r'^$', 'main_view', name='libraries_main_view'),
7 url(r'^/$', lambda x: HttpResponseRedirect(x.path[:-1])),
8 url(r'^/(?P<slug>[a-zA-Z0-9_-]+)$', 'library_view', name='library_view'),