Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_mgabolanimav
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Mavrick Jordan Lee
midterm_mgabolanimav
Commits
3e3d6946
Commit
3e3d6946
authored
May 06, 2023
by
Mavrick Jordan Lee
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Edit Widget User Page. Updated urls, views, and widgetuser-details.html.
parent
b06aba32
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
2 deletions
+20
-2
widgetuser-details.html
...mav/dashboard/templates/dashboard/widgetuser-details.html
+3
-1
widgetuser-edit.html
...animav/dashboard/templates/dashboard/widgetuser-edit.html
+10
-0
urls.py
widget_mgabolanimav/dashboard/urls.py
+2
-1
views.py
widget_mgabolanimav/dashboard/views.py
+5
-0
No files found.
widget_mgabolanimav/dashboard/templates/dashboard/widgetuser-details.html
View file @
3e3d6946
...
@@ -6,5 +6,7 @@
...
@@ -6,5 +6,7 @@
{{ object.user_department.dept_name }}
<br>
{{ object.user_department.dept_name }}
<br>
{{ object.user_department.home_unit }}
{{ object.user_department.home_unit }}
</p>
</p>
<a
href=
"{% url 'dashboard:widgetuser-edit' object.id %}"
>
<button>
Edit Widget User
</button>
<button>
Edit Widget User
</button>
</a>
{% endblock %}
{% endblock %}
\ No newline at end of file
widget_mgabolanimav/dashboard/templates/dashboard/widgetuser-edit.html
0 → 100644
View file @
3e3d6946
{% extends 'base.html' %}
{% block title %}Edit Widget User{% endblock %}
{% block content %}
<h2>
Edit Widget User:
</h2>
<form
method=
"POST"
>
{% csrf_token %}
{{ form.as_p }}
<input
type=
"Submit"
value=
"Save Changes to Widget User"
>
</form>
{% endblock %}
\ No newline at end of file
widget_mgabolanimav/dashboard/urls.py
View file @
3e3d6946
...
@@ -2,13 +2,14 @@ from django.urls import path
...
@@ -2,13 +2,14 @@ from django.urls import path
from
.
import
views
from
.
import
views
from
.views
import
(
from
.views
import
(
WidgetUserDetailsView
,
WidgetUserCreateView
WidgetUserDetailsView
,
WidgetUserCreateView
,
WidgetUserUpdateView
)
)
urlpatterns
=
[
urlpatterns
=
[
path
(
'dashboard/'
,
views
.
dashboard
,
name
=
"dashboard"
),
path
(
'dashboard/'
,
views
.
dashboard
,
name
=
"dashboard"
),
path
(
'widgetusers/<int:pk>/details/'
,
WidgetUserDetailsView
.
as_view
(),
name
=
"widgetuser-detail"
),
path
(
'widgetusers/<int:pk>/details/'
,
WidgetUserDetailsView
.
as_view
(),
name
=
"widgetuser-detail"
),
path
(
'widgetusers/add/'
,
WidgetUserCreateView
.
as_view
(),
name
=
"widgetuser-add"
),
path
(
'widgetusers/add/'
,
WidgetUserCreateView
.
as_view
(),
name
=
"widgetuser-add"
),
path
(
'widgetusers/<int:pk>/edit/'
,
WidgetUserUpdateView
.
as_view
(),
name
=
"widgetuser-edit"
),
]
]
app_name
=
'dashboard'
app_name
=
'dashboard'
\ No newline at end of file
widget_mgabolanimav/dashboard/views.py
View file @
3e3d6946
...
@@ -18,3 +18,8 @@ class WidgetUserCreateView(CreateView):
...
@@ -18,3 +18,8 @@ class WidgetUserCreateView(CreateView):
model
=
WidgetUser
model
=
WidgetUser
fields
=
'__all__'
fields
=
'__all__'
template_name
=
'dashboard/widgetuser-add.html'
template_name
=
'dashboard/widgetuser-add.html'
class
WidgetUserUpdateView
(
UpdateView
):
model
=
WidgetUser
fields
=
'__all__'
template_name
=
'dashboard/widgetuser-edit.html'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment