try:
    from django.conf.urls import patterns  # Django>=1.6
except ImportError:
    from django.conf.urls.defaults import patterns  # Django<1.6

import os

app_dir = os.path.dirname(__file__)

urlpatterns = patterns(
    '',
    (r'^media/(.*)$', 'django.views.static.serve', {
        'document_root': '%s/media' % app_dir}),
)

from django.conf.urls import patterns

import os

app_dir = os.path.dirname(__file__)

urlpatterns = patterns(
    '',
    (r'^media/(.*)$', 'django.views.static.serve', {
        'document_root': '%s/media' % app_dir}),
)

Drop support for Django 1.6
Drop support for Django 1.6

- try:
-     from django.conf.urls import patterns  # Django>=1.6
+ from django.conf.urls import patterns
- except ImportError:
-     from django.conf.urls.defaults import patterns  # Django<1.6
  
  import os
  
  app_dir = os.path.dirname(__file__)
  
  urlpatterns = patterns(
      '',
      (r'^media/(.*)$', 'django.views.static.serve', {
          'document_root': '%s/media' % app_dir}),
  )
  
Drop support for Django 1.6
## Code Before:
try:
    from django.conf.urls import patterns  # Django>=1.6
except ImportError:
    from django.conf.urls.defaults import patterns  # Django<1.6

import os

app_dir = os.path.dirname(__file__)

urlpatterns = patterns(
    '',
    (r'^media/(.*)$', 'django.views.static.serve', {
        'document_root': '%s/media' % app_dir}),
)

## Instruction:
Drop support for Django 1.6
## Code After:
from django.conf.urls import patterns

import os

app_dir = os.path.dirname(__file__)

urlpatterns = patterns(
    '',
    (r'^media/(.*)$', 'django.views.static.serve', {
        'document_root': '%s/media' % app_dir}),
)
