Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_princessgabi
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
Ysabella Panghulan
midterm_princessgabi
Commits
19770cef
Commit
19770cef
authored
May 15, 2023
by
Gabriel G. Garrero
Committed by
Ysabella Panghulan
May 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed urls to widgetusers: removed
'dashboard/' before it
parent
6f329e2f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
7 deletions
+8
-7
models.py
widget_princessgabi/dashboard/models.py
+3
-3
dashboard.html
...princessgabi/dashboard/templates/dashboard/dashboard.html
+1
-1
urls.py
widget_princessgabi/dashboard/urls.py
+3
-3
urls.py
widget_princessgabi/widget_princessgabi/urls.py
+1
-0
No files found.
widget_princessgabi/dashboard/models.py
View file @
19770cef
...
...
@@ -8,7 +8,7 @@ class Department(models.Model):
home_unit
=
models
.
CharField
(
max_length
=
100
)
def
__str__
(
self
):
return
self
.
dept_name
return
self
.
dept_name
+
', '
+
self
.
home_unit
class
WidgetUser
(
models
.
Model
):
first_name
=
models
.
CharField
(
max_length
=
50
)
...
...
@@ -17,7 +17,7 @@ class WidgetUser(models.Model):
department
=
models
.
ForeignKey
(
Department
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
return
self
.
last_name
+
' '
+
self
.
first_name
return
self
.
last_name
+
'
,
'
+
self
.
first_name
def
get_absolute_url
(
self
):
return
reverse
(
"
dashboard
:widgetuser-details"
,
kwargs
=
{
"pk"
:
self
.
pk
})
return
reverse
(
"
widgetusers
:widgetuser-details"
,
kwargs
=
{
"pk"
:
self
.
pk
})
widget_princessgabi/dashboard/templates/dashboard/dashboard.html
View file @
19770cef
...
...
@@ -23,7 +23,7 @@
{% endfor %}
</ol>
</div>
<a
href=
"
/dashboard
/widgetusers/add"
class=
"add-btn"
><i
class=
"fa fa-plus"
></i>
Add Widget User
</a>
<a
href=
"
..
/widgetusers/add"
class=
"add-btn"
><i
class=
"fa fa-plus"
></i>
Add Widget User
</a>
</div>
{% endblock %}
<div
class=
"links"
>
...
...
widget_princessgabi/dashboard/urls.py
View file @
19770cef
...
...
@@ -4,9 +4,9 @@ from .views import dashboard, WidgetUserDetailView, WidgetUserCreateView, Widget
urlpatterns
=
[
path
(
''
,
dashboard
,
name
=
'dashboard'
),
path
(
'
widgetusers/<int:pk>/details
'
,
WidgetUserDetailView
.
as_view
(),
name
=
'widgetuser-details'
),
path
(
'
widgetusers/add
'
,
WidgetUserCreateView
.
as_view
(),
name
=
"widgetuser-add"
),
path
(
'
widgetusers/<int:pk>/edit
'
,
WidgetUserUpdateView
.
as_view
(),
name
=
"widgetuser-edit"
),
path
(
'
<int:pk>/details/
'
,
WidgetUserDetailView
.
as_view
(),
name
=
'widgetuser-details'
),
path
(
'
add/
'
,
WidgetUserCreateView
.
as_view
(),
name
=
"widgetuser-add"
),
path
(
'
<int:pk>/edit/
'
,
WidgetUserUpdateView
.
as_view
(),
name
=
"widgetuser-edit"
),
]
app_name
=
"dashboard"
\ No newline at end of file
widget_princessgabi/widget_princessgabi/urls.py
View file @
19770cef
...
...
@@ -22,5 +22,6 @@ urlpatterns = [
path
(
'forum/'
,
include
(
"forum.urls"
,
namespace
=
"forum"
)),
path
(
'announcements/'
,
include
(
'announcementboard.urls'
)),
path
(
'dashboard/'
,
include
(
'dashboard.urls'
,
namespace
=
"dashboard"
)),
path
(
"widgetusers/"
,
include
(
"dashboard.urls"
,
namespace
=
"widgetusers"
)),
path
(
'admin/'
,
admin
.
site
.
urls
),
]
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