Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
andrada_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
Alvin Joshua Andrada
andrada_reading
Commits
b26b8fa9
Commit
b26b8fa9
authored
Apr 25, 2023
by
Alvin Joshua Andrada
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modified buttons
parent
56720e64
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
4 additions
and
19 deletions
+4
-19
views.cpython-39.pyc
andrada_reading/bookshelf/__pycache__/views.cpython-39.pyc
+0
-0
forms.py
andrada_reading/bookshelf/forms.py
+0
-15
author_details.html
...reading/bookshelf/templates/bookshelf/author_details.html
+1
-1
book_details.html
...a_reading/bookshelf/templates/bookshelf/book_details.html
+1
-1
edit-author.html
...da_reading/bookshelf/templates/bookshelf/edit-author.html
+1
-1
views.py
andrada_reading/bookshelf/views.py
+1
-1
db.sqlite3
andrada_reading/db.sqlite3
+0
-0
No files found.
andrada_reading/bookshelf/__pycache__/views.cpython-39.pyc
View file @
b26b8fa9
No preview for this file type
andrada_reading/bookshelf/forms.py
deleted
100644 → 0
View file @
56720e64
# forms bookshelf
from
django
import
forms
from
.models
import
Author
,
Books
class
BookForm
(
forms
.
ModelForm
):
class
Meta
:
model
=
Book
fields
=
[
'title'
,
'author'
,
'publisher'
,
'year_published'
,
'ISBN'
,
'blurb'
]
class
AuthorForm
(
forms
.
ModelForm
):
class
Meta
:
model
=
Author
fields
=
[
'first_name'
,
'last_name'
,
'age'
,
'nationality'
,
'bio'
]
andrada_reading/bookshelf/templates/bookshelf/author_details.html
View file @
b26b8fa9
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
<h4>
{{ author.nationality }}
</h4>
<h4>
{{ author.nationality }}
</h4>
<h4>
{{ author.bio }}
</h4>
<h4>
{{ author.bio }}
</h4>
<button
href=
"{% url 'bookshelf:edit-author' object.id %}"
>
Edit Author
</button>
<br>
<button
><a
href=
"{% url 'bookshelf:edit-author' author.id %}"
>
Edit Author
</a>
</button>
<br>
<h4>
Books by {{ author.first_name }} {{ author.last_name }} I love:
</h4>
<h4>
Books by {{ author.first_name }} {{ author.last_name }} I love:
</h4>
<ul>
<ul>
...
...
andrada_reading/bookshelf/templates/bookshelf/book_details.html
View file @
b26b8fa9
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
<h3>
{{ object.year_published }}
</h3>
<h3>
{{ object.year_published }}
</h3>
<h3>
{{ object.ISBN }}
</h3>
<h3>
{{ object.ISBN }}
</h3>
<h3>
{{ object.blurb }}
</h3>
<h3>
{{ object.blurb }}
</h3>
<button
href=
"{% url 'bookshelf:edit-book' object.id %}"
>
Edit Book
</button>
<br>
<button
><a
href=
"{% url 'bookshelf:edit-book' object.id %}"
>
Edit Book
</a>
</button>
<br>
<a
href=
"/home/"
>
Home
</a>
<a
href=
"/home/"
>
Home
</a>
<a
href=
"/home/books/"
>
Books
</a>
<a
href=
"/home/books/"
>
Books
</a>
<a
href=
"/home/authors/"
>
Authors
</a>
<a
href=
"/home/authors/"
>
Authors
</a>
...
...
andrada_reading/bookshelf/templates/bookshelf/edit-author.html
View file @
b26b8fa9
<!-- edit-author html -->
<!-- edit-author html -->
{% extends 'base.html' %}
{% extends 'base.html' %}
{% load static %}
{% load static %}
{% block title %}Add New
Book
{% endblock %}
{% block title %}Add New
Author
{% endblock %}
{% block content %}
{% block content %}
{{ form.non_field_errors }}
{{ form.non_field_errors }}
...
...
andrada_reading/bookshelf/views.py
View file @
b26b8fa9
...
@@ -53,7 +53,7 @@ class AuthorCreateView(CreateView):
...
@@ -53,7 +53,7 @@ class AuthorCreateView(CreateView):
return
reverse
(
'bookshelf:author-detail'
,
kwargs
=
{
'author_id'
:
self
.
object
.
pk
})
return
reverse
(
'bookshelf:author-detail'
,
kwargs
=
{
'author_id'
:
self
.
object
.
pk
})
class
AuthorUpdateView
(
UpdateView
):
class
AuthorUpdateView
(
UpdateView
):
model
=
Books
model
=
Author
fields
=
'__all__'
fields
=
'__all__'
template_name
=
'bookshelf/edit-author.html'
template_name
=
'bookshelf/edit-author.html'
def
get_success_url
(
self
):
def
get_success_url
(
self
):
...
...
andrada_reading/db.sqlite3
View file @
b26b8fa9
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