try:
    from django.conf.urls import patterns, url
except ImportError:
    from django.conf.urls.defaults import patterns, url

urlpatterns = patterns(
    'robots.views',
    url(r'^$', 'rules_list', name='robots_rule_list'),
)

from django.conf.urls import url

from robots.views import rules_list


urlpatterns = [
    url(r'^$', rules_list, name='robots_rule_list'),
]

Fix warnings about URLconf in Django 1.9
Fix warnings about URLconf in Django 1.9

* django.conf.urls.patterns will be removed in Django 1.10
* Passing a dotted path and not a view function will be deprecated in
  Django 1.10

- try:
-     from django.conf.urls import patterns, url
+ from django.conf.urls import url
- except ImportError:
-     from django.conf.urls.defaults import patterns, url
  
+ from robots.views import rules_list
- urlpatterns = patterns(
-     'robots.views',
-     url(r'^$', 'rules_list', name='robots_rule_list'),
- )
  
+ 
+ urlpatterns = [
+     url(r'^$', rules_list, name='robots_rule_list'),
+ ]
+ 
Fix warnings about URLconf in Django 1.9
## Code Before:
try:
    from django.conf.urls import patterns, url
except ImportError:
    from django.conf.urls.defaults import patterns, url

urlpatterns = patterns(
    'robots.views',
    url(r'^$', 'rules_list', name='robots_rule_list'),
)

## Instruction:
Fix warnings about URLconf in Django 1.9
## Code After:
from django.conf.urls import url

from robots.views import rules_list


urlpatterns = [
    url(r'^$', rules_list, name='robots_rule_list'),
]
