Source

django-inline / example / urls.py

from django.conf.urls.defaults import patterns, url, include
from django.conf import settings

import django.views.generic as gen_views
from django import VERSION

if VERSION >= (1, 3, 0):
    urlpatterns = patterns('',
        url(r'^$', gen_views.base.TemplateView.as_view(template_name='base.html'), name='index'),
    )

else:
    urlpatterns = patterns('',
        url(r'^$', gen_views.simple.direct_to_template, {'template': 'base.html'}, name='index'),
    )

if settings.DEBUG:
    urlpatterns += patterns('',
        (r'^m/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': settings.MEDIA_ROOT}),
    )

urlpatterns += patterns('',
    (r'^inline/', include('django_inline')),
)