[Answer]-Render a different view based on drop down menu selection

1👍

Figured this out on my own

submitted the desired view (view_wanted) via the post value

<form method="POST" action=""/>{% csrf_token %}
    <select name = "view_wanted">
        <option value="add_new_job" >Add A New Job At This Site</option>
        <option value="manage_jobs" >Manage Ongoing Jobs At This Site</option>
        <option value="manage_site_equipment" >Manage Site Equipment Rent</option>
        <option value="manage_site_services" >Manage Site Services</option>
    </select>
    <input type="submit"  value="View Details" />
</form>

and the relevant view

def view_project(request, project_id):
    context = RequestContext(request)
    user = User.objects.get(project_sites__id=project_id)
    site = ProjectSite.objects.get(id=project_id)
    args = {}
    # print request.POST.get('view_wanted')

    if request.method == 'POST':
        view_wanted = request.POST.get('view_wanted')
        return redirect(reverse(view_wanted, args=(project_id,)))

Leave a comment