Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 3rd, 2012  |  syntax: None  |  size: 0.63 KB  |  hits: 18  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. class Update(Resource):
  2.  
  3.     def override_urls(self):
  4.         urls = [url(r"^(?P<resource_name>%s)%s$" % (self._meta.resource_name, trailing_slash()),
  5.                     self.wrap_view('dispatch_update'), name="api_dispatch_update")
  6.         ]
  7.  
  8.         return urls
  9.  
  10.     def dispatch_update(self, request, **kwargs):
  11.         return self.dispatch('update', request, **kwargs)
  12.  
  13.     def get_update(self, request, **kwargs):
  14.  
  15.         updateStatus = {}
  16.  
  17.         return self.create_response(request, updateStatus)
  18.  
  19.     class Meta:
  20.  
  21.         authentication = Authentication()
  22.         authorization = Authorization()
  23.         update_allowed_methods = ['get']