Commit 56ecb786 authored by justin's avatar justin

feat: added add user function

parent 11d8cae9
...@@ -9,4 +9,5 @@ ...@@ -9,4 +9,5 @@
</a> </a>
{% endfor %} {% endfor %}
</ul> </ul>
<a href="../widgetusers/add">Add Widget User</a>
{% endblock %} {% endblock %}
{% extends 'base.html' %} {% extends 'base.html' %}
{% load static %} {% load static %}
{% block title %} Edit User {% endblock %} {% block title %} Add Widget User {% endblock %}
{% block content %} {% block content %}
<form method="post"> <div class="user-form">
{% csrf_token %} <h1>Add a new widget user:</h1>
{{ form.as_p }} <form method="post">
<input type="submit" value="Save Changes" /> {% csrf_token %}
</form> {{ form.as_p }}
Ito ay test!!! <input type="submit" value="Add Widget User" />
</form>
</div>
{% endblock %} {% endblock %}
...@@ -6,6 +6,6 @@ ...@@ -6,6 +6,6 @@
<form method="post"> <form method="post">
{% csrf_token %} {% csrf_token %}
{{ form.as_p }} {{ form.as_p }}
<input type="submit" value="Save Changes" /> <input type="submit" value="Save Changes to Widget User" />
</form> </form>
{% endblock %} {% endblock %}
...@@ -11,7 +11,7 @@ urlpatterns = [ ...@@ -11,7 +11,7 @@ urlpatterns = [
), ),
path( path(
"add/", "add/",
views.WidgetUserDetailView.as_view(), views.WidgetUserCreateView.as_view(),
name="user-add", name="user-add",
), ),
path( path(
......
...@@ -17,6 +17,7 @@ def dashboard(request): ...@@ -17,6 +17,7 @@ def dashboard(request):
class WidgetUserDetailView(DetailView): class WidgetUserDetailView(DetailView):
model = WidgetUser model = WidgetUser
fields = "__all__"
template_name = "dashboard/widgetuser-details.html" template_name = "dashboard/widgetuser-details.html"
......
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