POST handler for User and Profile

13 views
Skip to first unread message

Jer

unread,
Mar 17, 2011, 6:07:11 AM3/17/11
to django-piston
I'd like to create a handler such that I can make a post request to
create a new django User and an associated profile.

I'm specifying the model to be my profile model since it references
User as a foreign key. I don't have any problems when I try to do
this for 'GET', but run into problems when doing a 'POST'. When I
try to specify the username in my http PUT request, piston says it
cannot resolve keyword 'username' into a field. If I omit the
'username' from my POST request, I get a message saying that it is
required. How can I specify what I what the username is going to be
for the new User object?

Thanks for the help.
Reply all
Reply to author
Forward
0 new messages