John Gathm
unread,Apr 28, 2012, 3:21:13 AM4/28/12Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to django-rest-framework
Hi
I'm having difficulties figuring how to use django-rest-framork
achieving my goals, though it might be to my understanding of REST
Let's suppose I have a pseudo-model
class User :
-username
-password
-adress
-is3rpartyServerAccountActive
I understand perfectly well how I can use REST with django-rest-
framework to get a list of users, update adress if a user wants to
update his profile, etc.
However, this model is used to manage 3rd party software, IE if a user
enable or disable is3rpartyServerAccountActive, it should enable
business server logic, business script (for instance, to disable or
enable account in 3rd party software, or to take any action).
While it feels natural for me to figure how to make this in an RPC
form, I don't get it where I should hook such business logic with
django-rest-framework
where should I hook a enable3rdPartyServerAccount() function inside
django, before the model is actually updated ? Taking into account
that the function might also return false and fail.
Using pure django, I would do this logic in the view, before rendering
response, but I don't see where with django-rest-framework.
Perhaps the problem is I want to use REST to manage a not-so stateless
remote server resource ?
Regards,
J.