Skip to content

Instantly share code, notes, and snippets.

@zlw
Created March 9, 2011 23:00
Show Gist options
  • Save zlw/863191 to your computer and use it in GitHub Desktop.
Save zlw/863191 to your computer and use it in GitHub Desktop.
attrs added to create() and update()
from piston.handler import BaseHandler
class MyHandler(BaseHandler):
def create(self, request, *args, **kwags):
attrs = {
'user': request.user
}
return super(BaseHandler, self).create(request, *args, attrs=attrs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment