I
I
Innoel2019-08-16 15:20:26
Vue.js
Innoel, 2019-08-16 15:20:26

How to output script execution result from Django to Vue.js?

There is a Djano+DjangoRest+Vue.js project.
It implements the simplest application for creating notes, figured it out, requests to Django are sent, everything is saved and displayed.
There is also a simple form in which the user enters data, they must be processed on the server side by a script, and the result of the script execution is displayed in Vue, but I do not understand how to implement this. Can I send an HTTP request to Django via Axios, execute a script, and get the result of the script execution as a response, and how can I do it?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
Web Dentist, 2019-08-17
@Innoel

What's the problem? If you have already made a creation?
Just specify the necessary data in the Response view and already render using vue.

A
Astrohas, 2019-08-16
@Astrohas

APIView https://www.django-rest-framework.org/api-guide/views/

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question