from django.conf.urls import patterns, url
from django.contrib import admin
from name import views, feeds


admin.autodiscover()

urlpatterns = patterns(
    '',
    url(r'stats.json/$', 'name.api.views.stats_json', name='stats-json'),
    url(r'stats/$', 'name.views.stats', name='stats'),
    url(r'label/(?P<name_value>.*)$', 'name.views.label', name='label'),
    url(r'feed/$', feeds.NameAtomFeed(), name='feed'),
    url(r'map/$', 'name.views.map', name='map'),
    url(r'locations.json/$', 'name.api.views.locations_json', name='locations-json'),
    url(r'^$', 'name.views.landing', name='landing'),
    url(r'export/$', 'name.views.export', name='export'),
    url(r'search/$', views.SearchView.as_view(), name='search'),
    url(r'search.json$', 'name.api.views.search_json', name="search-json"),
    url(r'about/$', 'name.views.about', name='about'),
    url(r'(?P<name_id>.*).json$', 'name.api.views.name_json', name='detail-json'),
    url(r'opensearch.xml$', 'name.views.opensearch', name='opensearch'),
    url(
        r'(?P<name_id>.*).mads.xml$',
        'name.views.mads_serialize',
        name='mads-serialize'
    ),
    url(
        r'(?P<name_id>[^/]+)/',
        'name.views.detail',
        name='detail'
    ),
)

@@ -25,18 +25,8 @@
 port
- patterns,
  url
@@ -63,17 +63,15 @@
 min%0A
+%0A
 from 
-name
+.
  imp
@@ -87,16 +87,46 @@
 , feeds%0A
+from .api import views as api%0A
 %0A%0Aadmin.
@@ -159,25 +159,9 @@
 s = 
-patterns(%0A    '',
+%5B
 %0A   
@@ -182,31 +182,19 @@
 son/$', 
-'name.api.views
+api
 .stats_j
@@ -192,25 +192,24 @@
 i.stats_json
-'
 , name='stat
@@ -234,30 +234,24 @@
 r'stats/$', 
-'name.
 views.stats'
@@ -249,17 +249,16 @@
 ws.stats
-'
 , name='
@@ -300,30 +300,24 @@
 alue%3E.*)$', 
-'name.
 views.label'
@@ -315,17 +315,16 @@
 ws.label
-'
 , name='
@@ -401,30 +401,24 @@
 l(r'map/$', 
-'name.
 views.map', 
@@ -414,17 +414,16 @@
 iews.map
-'
 , name='
@@ -458,31 +458,19 @@
 son/$', 
-'name.api.views
+api
 .locatio
@@ -472,25 +472,24 @@
 cations_json
-'
 , name='loca
@@ -513,30 +513,24 @@
  url(r'%5E$', 
-'name.
 views.landin
@@ -530,17 +530,16 @@
 .landing
-'
 , name='
@@ -566,30 +566,24 @@
 'export/$', 
-'name.
 views.export
@@ -582,17 +582,16 @@
 s.export
-'
 , name='
@@ -690,31 +690,19 @@
 json$', 
-'name.api.views
+api
 .search_
@@ -701,25 +701,24 @@
 .search_json
-'
 , name=%22sear
@@ -744,30 +744,24 @@
 r'about/$', 
-'name.
 views.about'
@@ -759,17 +759,16 @@
 ws.about
-'
 , name='
@@ -790,150 +790,130 @@
 l(r'
-(?P%3Cname_id%3E.*).json$', 'name.api.views.name_json', name='detail-json'),%0A    url(r'opensearch.xml$', 'name.views.opensearch', name='opensearch
+opensearch.xml$', views.opensearch, name='opensearch'),%0A    url(r'(?P%3Cname_id%3E.*).json$', api.name_json, name='detail-json
 '),%0A
@@ -916,33 +916,24 @@
 '),%0A    url(
-%0A        
 r'(?P%3Cname_i
@@ -949,31 +949,17 @@
 s.xml$',
-%0A        'name.
+ 
 views.ma
@@ -970,26 +970,17 @@
 erialize
-',%0A       
+,
  name='m
@@ -993,21 +993,16 @@
 rialize'
-%0A    
 ),%0A    u
@@ -1004,25 +1004,16 @@
     url(
-%0A        
 r'(?P%3Cna
@@ -1031,23 +1031,9 @@
 )/',
-%0A        'name.
+ 
 view
@@ -1044,18 +1044,9 @@
 tail
-',%0A       
+,
  nam
@@ -1059,14 +1059,8 @@
 ail'
-%0A    ),%0A)
+)%0A%5D
 %0A

Clean up the urlconf.