Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
midterm_OhMyBash
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
Nheo Samson
midterm_OhMyBash
Commits
001a00e5
Commit
001a00e5
authored
May 12, 2023
by
nheoxoz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
updated models.py with reverse
parent
d523ce09
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
0 deletions
+7
-0
models.cpython-310.pyc
...OhMyBash/announcements/__pycache__/models.cpython-310.pyc
+0
-0
models.py
widget_OhMyBash/announcements/models.py
+7
-0
No files found.
widget_OhMyBash/announcements/__pycache__/models.cpython-310.pyc
View file @
001a00e5
No preview for this file type
widget_OhMyBash/announcements/models.py
View file @
001a00e5
from
django.db
import
models
from
django.db
import
models
from
django.urls
import
reverse
class
Announcement
(
models
.
Model
):
class
Announcement
(
models
.
Model
):
...
@@ -19,6 +20,12 @@ class Announcement(models.Model):
...
@@ -19,6 +20,12 @@ class Announcement(models.Model):
self
.
body
,
self
.
body
,
)
)
def
get_absolute_url
(
self
):
return
reverse
(
'announcements:announcement-details'
,
kwargs
=
{
'pk'
:
self
.
pk
},
)
class
Reaction
(
models
.
Model
):
class
Reaction
(
models
.
Model
):
...
...
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