M
M
MalikDeveloper20772020-02-12 22:15:34
Django
MalikDeveloper2077, 2020-02-12 22:15:34

Django + Ajax DRF or not?

If I'm working with an ajax request, let's say create an article without reloading or like it. Do I need DRF for such things or can I just do something like:

class SomeView(View):
    def get(self, request):
        data = {}
        data["title"] = request.POST.get("title")
        # Получаем из data атрибута в ajax

Or is it worth using the Django rest framework for such things, writing an api and then working with it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Web Dentist, 2020-02-12
@MalikDeveloper2077

For isolated cases, you can use your design.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question