Commit 28f0dd27 by Rocky Duan

make delete actually working again

parent 60b2423c
......@@ -88,6 +88,12 @@ class Model(object):
self.retrieved = True
self.update_attributes(**response)
def delete(self):
url = self.url(action='delete', params=self.attributes)
response = perform_request('delete', url)
self.retrieved = True
self.update_attributes(**response)
@classmethod
def url_with_id(cls, params={}):
return cls.base_url + '/' + str(params['id'])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment