'''Url mapping for pages
'''
from django.conf.urls.defaults import patterns, url
from . import views

urlpatterns = patterns('',
    url('^(?P<slug>[\w\d\-]+)/$', views.page_view, name='show_page'),
    url('^(?P<slug>[\w\d\-]+)$', views.page_view, name='show_page'),
    url('^$', views.page_view, name='show_page'),
)

@@ -22,16 +22,50 @@
 ges%0A'''%0A
+try:  # Older django versions%0A    
 from dja
@@ -108,16 +108,97 @@
 ns, url%0A
+except:  # Newer django versions%0A    from django.conf.urls import patterns, url%0A%0A
 from . i

Update urls for a newer django version