from django.conf.urls import patterns, url

from piston.resource import Resource

from opps.containers.api import ContainerHandler, ContainerBoxHandler


container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)

urlpatterns = patterns(
    '',
    url(r'^container/$', container),
    url(r'^containerbox/$', containerbox),
)

from django.conf.urls import patterns, url

from piston.resource import Resource

from opps.containers.api import ContainerHandler, ContainerBoxHandler


container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)

urlpatterns = patterns(
    '',
    url(r'^container/$', container, {'emitter_format': 'json'}),
    url(r'^containerbox/$', containerbox, {'emitter_format': 'json'}),
)

Set emitter format json in api
Set emitter format json in api

  from django.conf.urls import patterns, url
  
  from piston.resource import Resource
  
  from opps.containers.api import ContainerHandler, ContainerBoxHandler
  
  
  container = Resource(handler=ContainerHandler)
  containerbox = Resource(handler=ContainerBoxHandler)
  
  urlpatterns = patterns(
      '',
-     url(r'^container/$', container),
+     url(r'^container/$', container, {'emitter_format': 'json'}),
-     url(r'^containerbox/$', containerbox),
+     url(r'^containerbox/$', containerbox, {'emitter_format': 'json'}),
  )
  
Set emitter format json in api
## Code Before:
from django.conf.urls import patterns, url

from piston.resource import Resource

from opps.containers.api import ContainerHandler, ContainerBoxHandler


container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)

urlpatterns = patterns(
    '',
    url(r'^container/$', container),
    url(r'^containerbox/$', containerbox),
)

## Instruction:
Set emitter format json in api
## Code After:
from django.conf.urls import patterns, url

from piston.resource import Resource

from opps.containers.api import ContainerHandler, ContainerBoxHandler


container = Resource(handler=ContainerHandler)
containerbox = Resource(handler=ContainerBoxHandler)

urlpatterns = patterns(
    '',
    url(r'^container/$', container, {'emitter_format': 'json'}),
    url(r'^containerbox/$', containerbox, {'emitter_format': 'json'}),
)
