Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
midterm_robo_mommy
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Raul Jarod Conanan
midterm_robo_mommy
Commits
5a4dbbee
Commit
5a4dbbee
authored
May 13, 2023
by
Jiuvi Anne Hu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes for typos and missed errors.
parent
a27d1e06
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
9 additions
and
9 deletions
+9
-9
urls.cpython-38.pyc
..._robo_mommy/announcements/__pycache__/urls.cpython-38.pyc
+0
-0
views.cpython-38.pyc
...robo_mommy/announcements/__pycache__/views.cpython-38.pyc
+0
-0
announcement-details.html
...cements/templates/announcements/announcement-details.html
+1
-1
announcement-edit.html
...ouncements/templates/announcements/announcement-edit.html
+1
-1
announcements.html
.../announcements/templates/announcements/announcements.html
+2
-2
urls.py
widget_robo_mommy/announcements/urls.py
+1
-1
views.py
widget_robo_mommy/announcements/views.py
+4
-4
No files found.
widget_robo_mommy/announcements/__pycache__/urls.cpython-38.pyc
View file @
5a4dbbee
No preview for this file type
widget_robo_mommy/announcements/__pycache__/views.cpython-38.pyc
View file @
5a4dbbee
No preview for this file type
widget_robo_mommy/announcements/templates/announcements/announcement-details.html
View file @
5a4dbbee
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<p>
{{ announcement.body }}
</p><br>
<p>
{{ announcement.body }}
</p><br>
<p>
<p>
{% for reaction in reaction.model.all %}
{% for reaction in reaction.model.all %}
{{ reaction.
name }}: {{ reaction.tally }}
<br>
{{ reaction.name }}: {{ reaction.tally }}
<br>
{% endfor %}
{% endfor %}
</p>
</p>
...
...
widget_robo_mommy/announcements/templates/announcements/announcement-edit.html
View file @
5a4dbbee
...
@@ -5,7 +5,7 @@
...
@@ -5,7 +5,7 @@
<title>
Edit Announcement
</title>
<title>
Edit Announcement
</title>
<h1>
Edit announcement:
</h1>
<h1>
Edit announcement:
</h1>
<form
action=
"/"
method=
"post"
>
<form
action=
"/"
method=
POST
>
{% csrf_token %}
{% csrf_token %}
{{ form.as_p }}
{{ form.as_p }}
<input
type=
"submit"
value=
"Save Changes to Announcement"
>
<input
type=
"submit"
value=
"Save Changes to Announcement"
>
...
...
widget_robo_mommy/announcements/templates/announcements/announcements.html
View file @
5a4dbbee
...
@@ -8,10 +8,10 @@
...
@@ -8,10 +8,10 @@
<h3>
Announcements:
</h3>
<h3>
Announcements:
</h3>
{% for announcement in announcements %}
{% for announcement in announcements %}
<a
href =
"
{{announcement.pk
}}/details/"
>
{{ announcement.title }} by {{ announcement.author.first_name }} {{ announcement.author.last_name }}
</a><br>
<a
href =
"
announcements/{{ announcedetails.pk
}}/details/"
>
{{ announcement.title }} by {{ announcement.author.first_name }} {{ announcement.author.last_name }}
</a><br>
{% endfor %}
<br>
{% endfor %}
<br>
<a
href=
"a
nnouncements/add/"
><button
value=
"click here"
>
Add Announcement
</button></a
><br>
<a
href=
"a
dd/"
><button
value=
"click here"
>
Add Announcement
</button></a><br
><br>
<a
href =
"/Dashboard/"
>
Dashboard
</a><br>
<a
href =
"/Dashboard/"
>
Dashboard
</a><br>
<a
href =
"/forum/"
>
Forum
</a><br>
<a
href =
"/forum/"
>
Forum
</a><br>
...
...
widget_robo_mommy/announcements/urls.py
View file @
5a4dbbee
...
@@ -3,7 +3,7 @@ from .views import index, AnnouncementDetailView, AnnouncementAddView, Announcem
...
@@ -3,7 +3,7 @@ from .views import index, AnnouncementDetailView, AnnouncementAddView, Announcem
urlpatterns
=
[
urlpatterns
=
[
path
(
'announcements/'
,
index
,
name
=
'index'
),
path
(
'announcements/'
,
index
,
name
=
'index'
),
path
(
'announcements/<int:pk>/details/'
,
AnnouncementDetailView
.
as_view
(),
name
=
'announcement
-detail
'
),
path
(
'announcements/<int:pk>/details/'
,
AnnouncementDetailView
.
as_view
(),
name
=
'announcement
detailview
'
),
path
(
'announcements/add/'
,
AnnouncementAddView
.
as_view
(),
name
=
'announcement-add'
),
path
(
'announcements/add/'
,
AnnouncementAddView
.
as_view
(),
name
=
'announcement-add'
),
path
(
'announcements/<int:pk>/edit/'
,
AnnouncementEditView
.
as_view
(),
name
=
'announcement-edit'
),
path
(
'announcements/<int:pk>/edit/'
,
AnnouncementEditView
.
as_view
(),
name
=
'announcement-edit'
),
]
]
...
...
widget_robo_mommy/announcements/views.py
View file @
5a4dbbee
...
@@ -23,14 +23,14 @@ def index(request):
...
@@ -23,14 +23,14 @@ def index(request):
class
AnnouncementDetailView
(
DetailView
):
class
AnnouncementDetailView
(
DetailView
):
model
=
Announcement
model
=
Announcement
template_name
=
'announcements/announcement-detail.html'
template_name
=
'announcements/announcement-detail
s
.html'
queryset
=
Announcement
.
objects
.
all
()
queryset
=
Announcement
.
objects
.
all
()
context_object_name
=
'annouce
ment-
details'
context_object_name
=
'annoucedetails'
class
AnnouncementAddView
(
CreateView
):
class
AnnouncementAddView
(
CreateView
):
model
=
Announcement
model
=
Announcement
fields
=
'__all__'
fields
=
'__all__'
template_name
=
'announcement-add.html'
template_name
=
'announcement
s/announcement
-add.html'
def
get_success_url
(
self
):
def
get_success_url
(
self
):
return
reverse
(
'announcement:announcementdetailview'
,
kwargs
=
{
'pk'
:
self
.
object
.
id
},
return
reverse
(
'announcement:announcementdetailview'
,
kwargs
=
{
'pk'
:
self
.
object
.
id
},
...
@@ -38,7 +38,7 @@ class AnnouncementAddView(CreateView):
...
@@ -38,7 +38,7 @@ class AnnouncementAddView(CreateView):
class
AnnouncementEditView
(
UpdateView
):
class
AnnouncementEditView
(
UpdateView
):
model
=
Announcement
model
=
Announcement
template_name
=
'announcements/announcement-edit'
template_name
=
'announcements/announcement-edit
.html
'
def
get_success_url
(
self
):
def
get_success_url
(
self
):
return
reverse
(
'announcement:announcementdetailview'
,
kwargs
=
{
'pk'
:
self
.
object
.
id
},
return
reverse
(
'announcement:announcementdetailview'
,
kwargs
=
{
'pk'
:
self
.
object
.
id
},
...
...
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