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
a0de761a
Commit
a0de761a
authored
Apr 25, 2023
by
Jan Ericsson Ong Ang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Editetd 4 new htmls
parent
ec6eaa00
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
29 additions
and
27 deletions
+29
-27
views.cpython-310.pyc
janang_reading/bookshelf/__pycache__/views.cpython-310.pyc
+0
-0
add-author.html
janang_reading/bookshelf/templates/bookshelf/add-author.html
+5
-5
add-book.html
janang_reading/bookshelf/templates/bookshelf/add-book.html
+7
-7
edit-author.html
...ng_reading/bookshelf/templates/bookshelf/edit-author.html
+7
-6
edit-book.html
janang_reading/bookshelf/templates/bookshelf/edit-book.html
+8
-7
views.py
janang_reading/bookshelf/views.py
+2
-2
No files found.
janang_reading/bookshelf/__pycache__/views.cpython-310.pyc
View file @
a0de761a
No preview for this file type
janang_reading/bookshelf/templates/bookshelf/add-author.html
View file @
a0de761a
...
...
@@ -7,15 +7,15 @@
<form
method=
"post"
>
{% csrf_token %}
<label>
First Name:
</label>
<input
id=
"first_name"
type=
"text"
name=
"first_name"
max
length=
"50"
required
/>
<input
id=
"first_name"
type=
"text"
name=
"first_name"
max
length=
"50"
/>
<label>
Last Name:
</label>
<input
id=
"last_name"
type=
"text"
name=
"last_name"
max
length=
"100"
required
/>
<input
id=
"last_name"
type=
"text"
name=
"last_name"
max
length=
"100"
/>
<label>
Age:
</label>
<input
id=
"age"
type=
"number"
name=
"age"
required
/>
<input
id=
"age"
type=
"number"
name=
"age"
/>
<label>
Nationality:
</label>
<input
id=
"nationality"
type=
"text"
name=
"nationality"
required
/>
<input
id=
"nationality"
type=
"text"
name=
"nationality"
/>
<label>
Bio:
</label>
<input
id=
"bio"
type=
"text"
name=
"bio"
required
/>
<input
id=
"bio"
type=
"text"
name=
"bio"
/>
</form>
<button
type=
"button"
>
...
...
janang_reading/bookshelf/templates/bookshelf/add-book.html
View file @
a0de761a
...
...
@@ -7,21 +7,21 @@
<form
method=
"post"
>
{% csrf_token %}
<label>
Title:
</label>
<input
id=
"title"
type=
"text"
name=
"title"
max
length=
"50"
required
/>
<input
id=
"title"
type=
"text"
name=
"title"
max
length=
"50"
/>
<label>
Author:
</label>
<input
id=
"author"
type=
"text"
name=
"author"
max
length=
"100"
required
/>
<input
id=
"author"
type=
"text"
name=
"author"
max
length=
"100"
/>
<label>
Publisher:
</label>
<input
id=
"publisher"
type=
"text"
name=
"publisher"
required
/>
<input
id=
"publisher"
type=
"text"
name=
"publisher"
/>
<label>
Year Published:
</label>
<input
id=
"year_published"
type=
"number"
name=
"year_published"
required
/>
<input
id=
"year_published"
type=
"number"
name=
"year_published"
/>
<label>
ISBN:
</label>
<input
id=
"ISBN"
type=
"number"
name=
"ISBN"
required
/>
<input
id=
"ISBN"
type=
"number"
name=
"ISBN"
/>
<label>
Blurb:
</label>
<input
id=
"blurb"
type=
"text"
name=
"blurb"
required
/>
<input
id=
"blurb"
type=
"text"
name=
"blurb"
/>
</form>
<button
type=
"button"
>
<a
href=
"/bookshelf/books/{{ book.id }}/details/"
>
<a
href=
"/bookshelf/books/{{ book
s
.id }}/details/"
>
Add Book
</a>
</button><br>
...
...
janang_reading/bookshelf/templates/bookshelf/edit-author.html
View file @
a0de761a
...
...
@@ -4,17 +4,18 @@
{% block title %}Edit Author{% endblock %}
{% block content %}
<form>
<form
method=
"post"
>
{% csrf_token %}
<label>
First Name:
</label>
<input
id=
"first_name"
type=
"text"
name=
"first_name"
max
length=
"50"
required
/>
<input
id=
"first_name"
type=
"text"
name=
"first_name"
max
length=
"50"
/>
<label>
Last Name:
</label>
<input
id=
"last_name"
type=
"text"
name=
"last_name"
max
length=
"100"
required
/>
<input
id=
"last_name"
type=
"text"
name=
"last_name"
max
length=
"100"
/>
<label>
Age:
</label>
<input
id=
"age"
type=
"number"
name=
"age"
required
/>
<input
id=
"age"
type=
"number"
name=
"age"
/>
<label>
Nationality:
</label>
<input
id=
"nationality"
type=
"text"
name=
"nationality"
required
/>
<input
id=
"nationality"
type=
"text"
name=
"nationality"
/>
<label>
Bio:
</label>
<input
id=
"bio"
type=
"text"
name=
"bio"
required
/>
<input
id=
"bio"
type=
"text"
name=
"bio"
/>
</form>
<button
type=
"button"
>
...
...
janang_reading/bookshelf/templates/bookshelf/edit-book.html
View file @
a0de761a
...
...
@@ -4,19 +4,20 @@
{% block title %}Edit Book{% endblock %}
{% block content %}
<form>
<form
method=
"post"
>
{% csrf_token %}
<label>
Title:
</label>
<input
id=
"title"
type=
"text"
name=
"title"
max
length=
"50"
required
/>
<input
id=
"title"
type=
"text"
name=
"title"
max
length=
"50"
/>
<label>
Author:
</label>
<input
id=
"author"
type=
"text"
name=
"author"
max
length=
"100"
required
/>
<input
id=
"author"
type=
"text"
name=
"author"
max
length=
"100"
/>
<label>
Publisher:
</label>
<input
id=
"publisher"
type=
"text"
name=
"publisher"
required
/>
<input
id=
"publisher"
type=
"text"
name=
"publisher"
/>
<label>
Year Published:
</label>
<input
id=
"year_published"
type=
"number"
name=
"year_published"
required
/>
<input
id=
"year_published"
type=
"number"
name=
"year_published"
/>
<label>
ISBN:
</label>
<input
id=
"ISBN"
type=
"number"
name=
"ISBN"
required
/>
<input
id=
"ISBN"
type=
"number"
name=
"ISBN"
/>
<label>
Blurb:
</label>
<input
id=
"blurb"
type=
"text"
name=
"blurb"
required
/>
<input
id=
"blurb"
type=
"text"
name=
"blurb"
/>
</form>
<button
type=
"button"
>
...
...
janang_reading/bookshelf/views.py
View file @
a0de761a
...
...
@@ -27,7 +27,7 @@ class AuthorView(ListView):
if
form
.
is_valid
():
return
self
.
get
(
request
,
*
args
,
**
kwargs
)
else
:
return
render
(
request
,
self
.
template_name
,
{
'form'
:
form
})
return
render
(
request
,
'bookshelf/author_details.html'
,
{
'form'
:
form
})
class
AuthorDetailView
(
DetailView
):
...
...
@@ -52,7 +52,7 @@ class BooksView(ListView):
if
form
.
is_valid
():
return
self
.
get
(
request
,
*
args
,
**
kwargs
)
else
:
return
render
(
request
,
self
.
template_name
,
{
'form'
:
form
})
return
render
(
request
,
'bookshelf/book_details.html'
,
{
'form'
:
form
})
class
BookDetailView
(
DetailView
):
pk_url_kwarg
=
'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