def addOrganizationPageView(request): if request.method == 'POST': new_organization = Organization() new_organization.company_name = request.POST.get('company_name') new_organization.email = request.POST.get('company_email') new_organization.address = request.POST.get('company_streetadd') new_organization.organization_id = random.randint(210, 10000) new_organization.save() organization_data = Organization.objects.all() context = { 'all_organizations': organization_data, 'new_organization': new_organization } return render(request, 'organization/vieworganization.html', context) else: return HttpResponse("NOT FOUND")