Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
carlosoarde_reading
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
Carlos Gabriel Oarde
carlosoarde_reading
Commits
88da925f
Commit
88da925f
authored
Mar 28, 2023
by
KaoruSawade
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edited models.py Books get_absolute_url to not str the pk
parent
27d7e4c4
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
1 deletion
+1
-1
models.cpython-311.pyc
...arde_reading/bookshelf/__pycache__/models.cpython-311.pyc
+0
-0
models.py
carlosoarde_reading/bookshelf/models.py
+1
-1
No files found.
carlosoarde_reading/bookshelf/__pycache__/models.cpython-311.pyc
View file @
88da925f
No preview for this file type
carlosoarde_reading/bookshelf/models.py
View file @
88da925f
...
@@ -24,5 +24,5 @@ class Books(models.Model):
...
@@ -24,5 +24,5 @@ class Books(models.Model):
def
__str__
(
self
):
def
__str__
(
self
):
return
"
\'
{}
\'
by {}, {}"
.
format
(
self
.
title
,
self
.
author
.
last_name
,
self
.
author
.
first_name
)
return
"
\'
{}
\'
by {}, {}"
.
format
(
self
.
title
,
self
.
author
.
last_name
,
self
.
author
.
first_name
)
def
get_absolute_url
(
self
):
def
get_absolute_url
(
self
):
return
reverse
(
'bookshelf:books-detail'
,
args
=
[
s
tr
(
self
.
pk
)
])
return
reverse
(
'bookshelf:books-detail'
,
args
=
[
s
elf
.
pk
])
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