Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
calvincruz_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
Calvin Josh Cruz
calvincruz_reading
Commits
e7b517b9
Commit
e7b517b9
authored
Apr 25, 2023
by
karin-kurusu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created and implemented "Edit Book Page"
parent
c955f3f5
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
14 additions
and
3 deletions
+14
-3
views.cpython-310.pyc
...ncruz_reading/bookshelf/__pycache__/views.cpython-310.pyc
+0
-0
book_detais.html
...uz_reading/bookshelf/templates/bookshelf/book_detais.html
+1
-1
edit-book.html
...cruz_reading/bookshelf/templates/bookshelf/edit-book.html
+11
-0
views.py
calvincruz_reading/bookshelf/views.py
+2
-2
db.sqlite3
calvincruz_reading/db.sqlite3
+0
-0
No files found.
calvincruz_reading/bookshelf/__pycache__/views.cpython-310.pyc
View file @
e7b517b9
No preview for this file type
calvincruz_reading/bookshelf/templates/bookshelf/book_detais.html
View file @
e7b517b9
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
<p>
{{book.ISBN}}
</p>
<p>
{{book.ISBN}}
</p>
<p>
{{book.blurb}}
</p>
<p>
{{book.blurb}}
</p>
<br>
<br>
<form
action=
'
books/book.get_pk/edit.html
'
>
<form
action=
'
edit
'
>
<input
type=
"submit"
value=
"Edit Book"
/>
<input
type=
"submit"
value=
"Edit Book"
/>
</form>
</form>
<br>
<br>
...
...
calvincruz_reading/bookshelf/templates/bookshelf/edit-book.html
0 → 100644
View file @
e7b517b9
{% extends 'base.html' %}
{% load static %}
{% block title %}Edit Book{% endblock %}
{% block content %}
<form
action=
''
method=
"POST"
>
{% csrf_token %}
{{ form.as_p }}
<input
type=
"submit"
value=
"Save Changes"
>
</form>
{% endblock %}
\ No newline at end of file
calvincruz_reading/bookshelf/views.py
View file @
e7b517b9
...
@@ -27,7 +27,7 @@ class BooksCreate(CreateView):
...
@@ -27,7 +27,7 @@ class BooksCreate(CreateView):
class
BooksUpdate
(
UpdateView
):
class
BooksUpdate
(
UpdateView
):
model
=
Books
model
=
Books
fields
=
'__all__'
fields
=
'__all__'
template_name
=
'bookshelf/
add
-book.html'
template_name
=
'bookshelf/
edit
-book.html'
class
AuthorCreate
(
CreateView
):
class
AuthorCreate
(
CreateView
):
model
=
Author
model
=
Author
...
@@ -37,7 +37,7 @@ class AuthorCreate(CreateView):
...
@@ -37,7 +37,7 @@ class AuthorCreate(CreateView):
class
AuthorUpdate
(
UpdateView
):
class
AuthorUpdate
(
UpdateView
):
model
=
Author
model
=
Author
fields
=
'__all__'
fields
=
'__all__'
template_name
=
'bookshelf/
add
-author.html'
template_name
=
'bookshelf/
edit
-author.html'
class
AuthorList
(
ListView
):
class
AuthorList
(
ListView
):
def
get
(
self
,
request
):
def
get
(
self
,
request
):
...
...
calvincruz_reading/db.sqlite3
View file @
e7b517b9
No preview for this file type
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