P
P
Peter Pitaev2021-01-13 17:39:16
Django
Peter Pitaev, 2021-01-13 17:39:16

Where to write your python scripts in django?

Hello!

I created a project on django, created an application, created a page with a form, the form accepts a file, and then sends it to the server using the POST method for further processing.

def index(request):
  if request.method == 'POST':
    form = myForm(request.POST, request.FILES)
    if form.is_valid():
       ...
       ...


I have no idea where to process it, in views.py? Create a new file and import it into views.py? And how to pull out the result from there and show each user your own? What if more than one person uses the form at the same time?

In general, the head is boiling and nothing is clear

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question