How to call an action from outside admin

60 views
Skip to first unread message

Ezequias Rocha

unread,
Aug 25, 2019, 9:00:35 AM8/25/19
to Django users
Hello everyone

I am using admin actions and it is great and easy.

Butner if I want to use the same function used by admin from outside (I.E. Postman HTTP request or a website request). How do the Django rest framework provides me?

Best regards
Ezequias

Derek

unread,
Aug 27, 2019, 9:54:09 AM8/27/19
to Django users
You need to separate out the "core" functionality of your action - the part that processes the records - into a stand-alone function.  This function can then be also called from your view(s) that currently handles the various HTTP requests you list.
Reply all
Reply to author
Forward
0 new messages