Commit 56ecb786 authored by justin's avatar justin

feat: added add user function

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