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
18c218fb
Commit
18c218fb
authored
May 15, 2023
by
Gabriel G. Garrero
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed urls to widgetusers: removed
'dashboard/' before it
parent
9d0b1e92
Changes
4
Hide 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 @
18c218fb
...
@@ -8,7 +8,7 @@ class Department(models.Model):
...
@@ -8,7 +8,7 @@ class Department(models.Model):
home_unit
=
models
.
CharField
(
max_length
=
100
)
home_unit
=
models
.
CharField
(
max_length
=
100
)
def
__str__
(
self
):
def
__str__
(
self
):
return
self
.
dept_name
return
self
.
dept_name
+
', '
+
self
.
home_unit
class
WidgetUser
(
models
.
Model
):
class
WidgetUser
(
models
.
Model
):
first_name
=
models
.
CharField
(
max_length
=
50
)
first_name
=
models
.
CharField
(
max_length
=
50
)
...
@@ -17,7 +17,7 @@ class WidgetUser(models.Model):
...
@@ -17,7 +17,7 @@ class WidgetUser(models.Model):
department
=
models
.
ForeignKey
(
Department
,
on_delete
=
models
.
CASCADE
)
department
=
models
.
ForeignKey
(
Department
,
on_delete
=
models
.
CASCADE
)
def
__str__
(
self
):
def
__str__
(
self
):
return
self
.
last_name
+
' '
+
self
.
first_name
return
self
.
last_name
+
'
,
'
+
self
.
first_name
def
get_absolute_url
(
self
):
def
get_absolute_url
(
self
):
return
reverse
(
"dashboard:widgetuser-details"
,
kwargs
=
{
"pk"
:
self
.
pk
})
return
reverse
(
"widgetusers:widgetuser-details"
,
kwargs
=
{
"pk"
:
self
.
pk
})
\ No newline at end of file
\ No newline at end of file
widget_princessgabi/dashboard/templates/dashboard/dashboard.html
View file @
18c218fb
...
@@ -23,7 +23,7 @@
...
@@ -23,7 +23,7 @@
{% endfor %}
{% endfor %}
</ol>
</ol>
</div>
</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>
</div>
{% endblock %}
{% endblock %}
<div
class=
"links"
>
<div
class=
"links"
>
...
...
widget_princessgabi/dashboard/urls.py
View file @
18c218fb
...
@@ -4,9 +4,9 @@ from .views import dashboard, WidgetUserDetailView, WidgetUserCreateView, Widget
...
@@ -4,9 +4,9 @@ from .views import dashboard, WidgetUserDetailView, WidgetUserCreateView, Widget
urlpatterns
=
[
urlpatterns
=
[
path
(
''
,
dashboard
,
name
=
'dashboard'
),
path
(
''
,
dashboard
,
name
=
'dashboard'
),
path
(
'
widgetusers/<int:pk>/details
'
,
WidgetUserDetailView
.
as_view
(),
name
=
'widgetuser-details'
),
path
(
'
<int:pk>/details/
'
,
WidgetUserDetailView
.
as_view
(),
name
=
'widgetuser-details'
),
path
(
'
widgetusers/add
'
,
WidgetUserCreateView
.
as_view
(),
name
=
"widgetuser-add"
),
path
(
'
add/
'
,
WidgetUserCreateView
.
as_view
(),
name
=
"widgetuser-add"
),
path
(
'
widgetusers/<int:pk>/edit
'
,
WidgetUserUpdateView
.
as_view
(),
name
=
"widgetuser-edit"
),
path
(
'
<int:pk>/edit/
'
,
WidgetUserUpdateView
.
as_view
(),
name
=
"widgetuser-edit"
),
]
]
app_name
=
"dashboard"
app_name
=
"dashboard"
\ No newline at end of file
widget_princessgabi/widget_princessgabi/urls.py
View file @
18c218fb
...
@@ -18,5 +18,6 @@ from django.urls import include, path
...
@@ -18,5 +18,6 @@ from django.urls import include, path
urlpatterns
=
[
urlpatterns
=
[
path
(
'dashboard/'
,
include
(
'dashboard.urls'
,
namespace
=
"dashboard"
)),
path
(
'dashboard/'
,
include
(
'dashboard.urls'
,
namespace
=
"dashboard"
)),
path
(
"widgetusers/"
,
include
(
"dashboard.urls"
,
namespace
=
"widgetusers"
)),
path
(
'admin/'
,
admin
.
site
.
urls
),
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