code: def register_computer_view(request):
      
      if request.method == "POST":
          form = ComputerRegistrationForm(request.POST)
          logger.debug(form)
          if form.is_valid():
              obj = form.save()
              obj.user = request.user
              obj.save()
              messages.success(request, "Successfully added computer.")
              return redirect("itemreg")
          else:
              messages.error(request, "Error adding computer.")
      else:
          form = ComputerRegistrationForm()
      return render(request, "itemreg/register_form.html", {"form": form, "action": "add", "type": "computer", "form_route": "itemreg_computer"})
docs: Register a computer.