from django.conf.urls import patterns, include, url
from wq.db import rest
from vera import views
from rest_framework.urlpatterns import format_suffix_patterns


def make_urls(views):
    urls = [
        url(r'^(?P<ids>[^\.]+)/' + name + '$', cls.as_view())
        for name, cls in views.items()
    ]
    return format_suffix_patterns(patterns('', *urls))

chart_urls = make_urls({
    'timeseries': views.TimeSeriesView,
    'scatter': views.ScatterView,
    'boxplot': views.BoxPlotView,
})

urlpatterns = patterns(
    '',
    url(r'^',       include(rest.router.urls)),
    url(r'^chart',  include(chart_urls))
)

@@ -25,18 +25,8 @@
 port
- patterns,
  inc
@@ -325,28 +325,13 @@
 rns(
-patterns('', *
 urls)
-)
 %0A%0Ach
@@ -483,25 +483,9 @@
 s = 
-patterns(%0A    '',
+%5B
 %0A   
@@ -570,10 +570,10 @@
 _urls))%0A
-)
+%5D
 %0A

update for django 1.10