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
4c48db27
Commit
4c48db27
authored
May 12, 2023
by
Ysabella Panghulan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed merge conflicts
parent
b6c590e2
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
2 deletions
+24
-2
models.py
widget_princessgabi/dashboard/models.py
+8
-1
dashboard.html
...princessgabi/dashboard/templates/dashboard/dashboard.html
+8
-0
urls.py
widget_princessgabi/dashboard/urls.py
+7
-0
views.py
widget_princessgabi/dashboard/views.py
+1
-1
No files found.
widget_princessgabi/dashboard/models.py
View file @
4c48db27
...
@@ -17,7 +17,14 @@ class WidgetUser(models.Model):
...
@@ -17,7 +17,14 @@ 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
):
<<<<<<<
HEAD
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
(
"dashboard:widgetuser-details"
,
kwargs
=
{
"pk"
:
self
.
pk
})
\ No newline at end of file
=======
return
self
.
first_name
+
' '
+
self
.
last_name
def
get_absolute_url
(
self
):
return
reverse
(
"widgetusers:user-details"
,
kwargs
=
{
"pk"
:
self
.
pk
})
>>>>>>>
50
c48d9
(
created
dashboard
.
html
,
updated
models
.
py
,
views
.
py
,
urls
.
py
to
account
for
new
dashboard
page
)
widget_princessgabi/dashboard/templates/dashboard/dashboard.html
View file @
4c48db27
...
@@ -11,12 +11,20 @@
...
@@ -11,12 +11,20 @@
<ul>
<ul>
{% for user in users %}
{% for user in users %}
<li>
<li>
<
<<<<<<
HEAD
<
a
href =
"{{ user.get_absolute_url }}"
>
{{ user.last_name }}, {{ user.first_name }}
</a>
<
a
href =
"{{ user.get_absolute_url }}"
>
{{ user.last_name }}, {{ user.first_name }}
</a>
=======
<a
href =
"{{ user.get_absoluteurl }}"
>
{{ user.last_name }}, {{ user.first_name }}
</a>
>>>>>>> 50c48d9 (created dashboard.html, updated models.py, views.py, urls.py to account for new dashboard page)
</li>
</li>
{% endfor %}
{% endfor %}
</ul>
</ul>
<
<<<<<<
HEAD
<
a
href =
"/dashboard/widgetusers/add"
>
Add Widget User
</a>
<
a
href =
"/dashboard/widgetusers/add"
>
Add Widget User
</a>
=======
<a
href =
"../widgetusers/add"
>
Add Widget User
</a>
>>>>>>> 50c48d9 (created dashboard.html, updated models.py, views.py, urls.py to account for new dashboard page)
<div>
<div>
<a
href =
"../announcements"
>
Announcement Board
</a>
<a
href =
"../announcements"
>
Announcement Board
</a>
...
...
widget_princessgabi/dashboard/urls.py
View file @
4c48db27
from
django.urls
import
path
from
django.urls
import
path
<<<<<<<
HEAD
from
.views
import
dashboard
,
WidgetUserDetailView
,
WidgetUserCreateView
,
WidgetUserUpdateView
from
.views
import
dashboard
,
WidgetUserDetailView
,
WidgetUserCreateView
,
WidgetUserUpdateView
urlpatterns
=
[
urlpatterns
=
[
...
@@ -7,6 +8,12 @@ urlpatterns = [
...
@@ -7,6 +8,12 @@ urlpatterns = [
path
(
'widgetusers/<int:pk>/details'
,
WidgetUserDetailView
.
as_view
(),
name
=
'widgetuser-details'
),
path
(
'widgetusers/<int:pk>/details'
,
WidgetUserDetailView
.
as_view
(),
name
=
'widgetuser-details'
),
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"
),
path
(
'widgetusers/<int:pk>/edit'
,
WidgetUserUpdateView
.
as_view
(),
name
=
"widgetuser-edit"
),
=======
from
.views
import
dashboard
urlpatterns
=
[
path
(
''
,
dashboard
,
name
=
'dashboard'
),
>>>>>>>
50
c48d9
(
created
dashboard
.
html
,
updated
models
.
py
,
views
.
py
,
urls
.
py
to
account
for
new
dashboard
page
)
]
]
app_name
=
"dashboard"
app_name
=
"dashboard"
\ No newline at end of file
widget_princessgabi/dashboard/views.py
View file @
4c48db27
...
@@ -25,4 +25,4 @@ class WidgetUserCreateView(CreateView):
...
@@ -25,4 +25,4 @@ class WidgetUserCreateView(CreateView):
class
WidgetUserUpdateView
(
UpdateView
):
class
WidgetUserUpdateView
(
UpdateView
):
model
=
WidgetUser
model
=
WidgetUser
template_name
=
'dashboard/widgetuser-edit.html'
template_name
=
'dashboard/widgetuser-edit.html'
fields
=
'__all__'
fields
=
'__all__'
\ No newline at end of file
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