from django.conf.urls.defaults import *
from piston.resource import Resource
from pony_server.api.handlers import PackageHandler, RootHandler, BuildHandler, TagHandler

package_handler = Resource(PackageHandler)
root_handler = Resource(RootHandler)
build_handler = Resource(BuildHandler)
tag_handler = Resource(TagHandler)

urlpatterns = patterns('',
   url(r'^package/(?P<slug>[^/]+)/builds/latest/', build_handler, {'latest': True }),
   url(r'^package/(?P<slug>[^/]+)/builds/(?P<data>[^/]+)/', build_handler),
   url(r'^package/(?P<slug>[^/]+)/builds/', build_handler),

   url(r'^package/(?P<slug>[^/]+)/tags/(?P<data>[^/]+)/latest/', tag_handler, {'latest': True }),
   url(r'^package/(?P<slug>[^/]+)/tags/(?P<data>[^/]+)/', tag_handler),
   url(r'^package/(?P<slug>[^/]+)/tags/', tag_handler),

   url(r'^package/(?P<slug>[^/]+)/', package_handler),
   url(r'^$', root_handler),
)

@@ -350,32 +350,24 @@
 ,%0A   url(r'%5E
-package/
 (?P%3Cslug%3E%5B%5E/
@@ -428,32 +428,24 @@
 ,%0A   url(r'%5E
-package/
 (?P%3Cslug%3E%5B%5E/
@@ -496,32 +496,24 @@
 ,%0A   url(r'%5E
-package/
 (?P%3Cslug%3E%5B%5E/
@@ -549,32 +549,24 @@
 %0A%0A   url(r'%5E
-package/
 (?P%3Cslug%3E%5B%5E/
@@ -639,32 +639,24 @@
 ,%0A   url(r'%5E
-package/
 (?P%3Cslug%3E%5B%5E/
@@ -703,32 +703,24 @@
 ,%0A   url(r'%5E
-package/
 (?P%3Cslug%3E%5B%5E/
@@ -760,16 +760,8 @@
 (r'%5E
-package/
 (?P%3C

Remove package namespace in the URLS since it was useless.