def import_voting_info_project_from_xml_view(request):
    # If person isn't signed in, we don't want to let them visit this page yet
    if not request.user.is_authenticated():
        return redirect('/admin')

    import_voting_info_project_from_xml()

    messages.add_message(request, messages.INFO, 'XML sample data imported.')

    return HttpResponseRedirect(reverse('import_export:import_export_index', args=()))
Take data from Test XML file and store in the local Voting Info Project database
dataset/ETHPy150Open wevoteeducation/WeVoteBase/import_export_voting_info_project/views.py/import_voting_info_project_from_xml_view