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

urlpatterns = patterns('',
    url(r'^menu/', include('admin_tools.menu.urls')),
    url(r'^dashboard/', include('admin_tools.dashboard.urls')),
)

@@ -1,8 +1,41 @@
+from django.conf import settings%0A
 from dja
@@ -95,90 +95,202 @@
 %0Aurl
-patterns = patterns('',%0A    url(r'%5Emenu/', include('admin_tools.menu.urls')),%0A    
+s = %5B%5D%0Aif 'admin_tools.menu' in settings.INSTALLED_APPS:%0A    urls.append(url(r'%5Emenu/', include('admin_tools.menu.urls')))%0Aif 'admin_tools.dashboard' in settings.INSTALLED_APPS:%0A    urls.append(
 url(
@@ -347,8 +347,41 @@
 s'))
-,%0A
+)%0A%0Aurlpatterns = patterns('', *urls
 )%0A

build urlpatterns conditionally regarding the content of INSTALLED_APPS