from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
    url(r'^admin_tools/', include('admin_tools.urls')),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)

try:
    from django.conf.urls import patterns, url, include
except ImportError: # django < 1.4
    from django.conf.urls.defaults import patterns, url, include
from django.conf import settings
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
    url(r'^admin_tools/', include('admin_tools.urls')),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)

Support for Django > 1.4 for test proj
Support for Django > 1.4 for test proj

- from django.conf.urls.defaults import *
+ try:
+     from django.conf.urls import patterns, url, include
+ except ImportError: # django < 1.4
+     from django.conf.urls.defaults import patterns, url, include
  from django.conf import settings
  from django.contrib import admin
  
  admin.autodiscover()
  
  urlpatterns = patterns('',
      (r'^admin/', include(admin.site.urls)),
      url(r'^admin_tools/', include('admin_tools.urls')),
      (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
  )
  
Support for Django > 1.4 for test proj
## Code Before:
from django.conf.urls.defaults import *
from django.conf import settings
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
    url(r'^admin_tools/', include('admin_tools.urls')),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)

## Instruction:
Support for Django > 1.4 for test proj
## Code After:
try:
    from django.conf.urls import patterns, url, include
except ImportError: # django < 1.4
    from django.conf.urls.defaults import patterns, url, include
from django.conf import settings
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    (r'^admin/', include(admin.site.urls)),
    url(r'^admin_tools/', include('admin_tools.urls')),
    (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
)
