Load Datatable after passing parameter on form submit to Django View

Unable to pass parameters at view side from the template and based on that want to load Datatable in my Django project

I have a simple form created in a template dateForm.html with date fields

    <form method="POST">
                <div class="row justify-content-center">
                    <div class="col-md-auto">
                        Start Date: <input type="text" name="startDate" id="startDate">
                    </div>
                    <div class="col-md-auto">
                        End Date: <input type="text" name="endDate" id="endDate">
                    </div>
                    <div class="col-md-auto">
                        <button  name="search" value="search" type="submit">Search</button>
                    </div>
                 </div>
    </form>

On Form submit want to pass the selected date to studentView.py
Issue: This form is inside a different python app ‘admin’ and Datatable Url is redirecting to a different python app ‘student’ View. So, Confused about how can I get this submitted date to the view the same as my Datatable view(Datatable is inside the dateForm.html only and dateForm.html is rendering from Adminview.py)

Source: Python Questions

LEAVE A COMMENT