Flask's routes and POST method to Django
<p>I have this fragment of code in Flask</p>

<pre><code>@app.route('/search', methods = ['POST'])
def search():
   if request.method == 'POST':
       results_arr = []
       img_path = request.form.get('img')
</code></pre>

<p>How to make this in Django or where I can read about it?</p>