Clean: cleaned views.py and createUser_form.html in homepage app

parent 55411191
......@@ -4,9 +4,7 @@
<h1>Create User:</h1>
<form method="POST" action="{% url 'homepage:newUser' %}">
{% csrf_token %}
<!-- {{ createUserForm.as_p }} -->
<h3> Enter Last Name: </h3> <input type="text" name="Last name">
<h3> Enter First Name: </h3> <input type="text" name="First name">
<h3> Enter Middle Name: </h3> <input type="text" name="Middle name">
......
......@@ -11,20 +11,9 @@ def index(request):
return render(request, "homepage/widgetusers_orderedlist.html", context)
def createUser(request):
# if request.method == "POST":
# createUserForm = CreateUserForm(request.POST)
# if createUserForm.is_valid():
# newWidgetUser = createUserForm.save()
# newWidgetUser.department_id = Department.objects.get(request.POST['Department'].pk)
# newWidgetUser.save()
# return redirect("homepage:createUser")
# else:
# createUserForm = CreateUserForm()
department = Department.objects.all()
context = {
"Department": department,
# "createUserForm" : createUserForm
}
return render(request, "homepage/createUser_form.html", context)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment