Is it possible to execute python command in admin panel or in django view?I. e. if I would like to sync database in my app using a button.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Write a custom admin view featuring a form, and when the form is submitted in the view call
django.core.management.call_commandRemark regarding using a form: As your request will change things at the server-side, a post must be preferred over a get.