Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
janang_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
Jan Ericsson Ong Ang
janang_reading
Commits
2cf4da2f
Commit
2cf4da2f
authored
Mar 28, 2023
by
Jan Ericsson Ong Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made a tentative change to views.py for bookshelf
parent
cc0495f2
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
4 deletions
+3
-4
admin.py
janang_reading/bookshelf/admin.py
+1
-2
models.py
janang_reading/bookshelf/models.py
+1
-1
views.py
janang_reading/bookshelf/views.py
+1
-1
No files found.
janang_reading/bookshelf/admin.py
View file @
2cf4da2f
from
django.contrib
import
admin
from
django.contrib
import
admin
# Register your models here.
from
.
models
import
Author
,
Books
from
.
models
import
Author
,
Books
# Register your models here.
class
AuthorAdmin
(
admin
.
ModelAdmin
):
class
AuthorAdmin
(
admin
.
ModelAdmin
):
model
=
Author
model
=
Author
list_display
=
(
"first_name"
,
"last_name"
,
"age"
,
"nationality"
,
"bio"
,)
list_display
=
(
"first_name"
,
"last_name"
,
"age"
,
"nationality"
,
"bio"
,)
...
...
janang_reading/bookshelf/models.py
View file @
2cf4da2f
...
@@ -9,7 +9,7 @@ class Author(models.Model):
...
@@ -9,7 +9,7 @@ class Author(models.Model):
bio
=
models
.
TextField
(
max_length
=
700
,
default
=
""
)
bio
=
models
.
TextField
(
max_length
=
700
,
default
=
""
)
def
__str__
(
self
):
def
__str__
(
self
):
return
self
.
first_name
+
self
.
last_name
return
self
.
first_name
+
" "
+
self
.
last_name
class
Books
(
models
.
Model
):
class
Books
(
models
.
Model
):
title
=
models
.
CharField
()
title
=
models
.
CharField
()
...
...
janang_reading/bookshelf/views.py
View file @
2cf4da2f
...
@@ -5,6 +5,6 @@ from .models import Author, Books
...
@@ -5,6 +5,6 @@ from .models import Author, Books
def
bookshelfIndex
(
request
):
def
bookshelfIndex
(
request
):
title
=
'Landing Page Stuff<br><br>'
title
=
'Landing Page Stuff<br><br>'
output_view
=
""
output_view
=
""
+
Author
+
" wrote "
+
Books
+
"!"
return
HttpResponse
(
title
+
output_view
)
return
HttpResponse
(
title
+
output_view
)
\ 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