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

parent 55411191
...@@ -5,8 +5,6 @@ ...@@ -5,8 +5,6 @@
<form method="POST" action="{% url 'homepage:newUser' %}"> <form method="POST" action="{% url 'homepage:newUser' %}">
{% csrf_token %} {% csrf_token %}
<!-- {{ createUserForm.as_p }} -->
<h3> Enter Last Name: </h3> <input type="text" name="Last name"> <h3> Enter Last Name: </h3> <input type="text" name="Last name">
<h3> Enter First Name: </h3> <input type="text" name="First name"> <h3> Enter First Name: </h3> <input type="text" name="First name">
<h3> Enter Middle Name: </h3> <input type="text" name="Middle name"> <h3> Enter Middle Name: </h3> <input type="text" name="Middle name">
......
...@@ -11,20 +11,9 @@ def index(request): ...@@ -11,20 +11,9 @@ def index(request):
return render(request, "homepage/widgetusers_orderedlist.html", context) return render(request, "homepage/widgetusers_orderedlist.html", context)
def createUser(request): 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() department = Department.objects.all()
context = { context = {
"Department": department, "Department": department,
# "createUserForm" : createUserForm
} }
return render(request, "homepage/createUser_form.html", context) 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