Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
eldondagdag_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
Eldon Dagdag
eldondagdag_reading
Commits
c1b179a7
Commit
c1b179a7
authored
Apr 25, 2023
by
Eldon Dagdag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Created html files, updated README, views and urls
parent
7f37c0b3
Changes
8
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
49 additions
and
6 deletions
+49
-6
README.txt
README.txt
+3
-3
add-author.html
...dag_reading/bookshelf/templates/bookshelf/add-author.html
+4
-0
add-book.html
...agdag_reading/bookshelf/templates/bookshelf/add-book.html
+4
-0
edit-author.html
...ag_reading/bookshelf/templates/bookshelf/edit-author.html
+4
-0
edit-book.html
...gdag_reading/bookshelf/templates/bookshelf/edit-book.html
+4
-0
home.html
eldondagdag_reading/bookshelf/templates/bookshelf/home.html
+3
-0
urls.py
eldondagdag_reading/bookshelf/urls.py
+5
-1
views.py
eldondagdag_reading/bookshelf/views.py
+22
-2
No files found.
README.txt
View file @
c1b179a7
Eldon Dagdag, 211764, CS40-E
Lab 0
3: My Favorite Books and Authors
March 28
, 2023
Lab 0
4: My Favorite Books and Authors v2
April 25
, 2023
This lab was truthfully completed by me
<sgd> Eldon Dagdag, March 28, 2023
\ No newline at end of file
<sgd> Eldon Dagdag, April 25, 2023
\ No newline at end of file
eldondagdag_reading/bookshelf/templates/bookshelf/add-author.html
0 → 100644
View file @
c1b179a7
{% extends 'base.html' %}
{% load static %}
{% block title %} {{ object.first_name }} {{ object.last_name }}{% endblock %}
{% block content %}
\ No newline at end of file
eldondagdag_reading/bookshelf/templates/bookshelf/add-book.html
0 → 100644
View file @
c1b179a7
{% extends 'base.html' %}
{% load static %}
{% block title %} {{ object.first_name }} {{ object.last_name }}{% endblock %}
{% block content %}
\ No newline at end of file
eldondagdag_reading/bookshelf/templates/bookshelf/edit-author.html
0 → 100644
View file @
c1b179a7
{% extends 'base.html' %}
{% load static %}
{% block title %} {{ object.first_name }} {{ object.last_name }}{% endblock %}
{% block content %}
\ No newline at end of file
eldondagdag_reading/bookshelf/templates/bookshelf/edit-book.html
0 → 100644
View file @
c1b179a7
{% extends 'base.html' %}
{% load static %}
{% block title %} {{ object.first_name }} {{ object.last_name }}{% endblock %}
{% block content %}
\ No newline at end of file
eldondagdag_reading/bookshelf/templates/bookshelf/home.html
View file @
c1b179a7
...
...
@@ -8,5 +8,8 @@
<div
class=
"container space-evenly"
>
<a
href=
"/bookshelf/books/"
>
Books
</a>
<a
href=
"/bookshelf/authors/"
>
Authors
</a>
<br>
<a
href=
"/bookshelf/books/add/"
>
Add Book
</a>
<a
href=
"/bookshelf/authors/add/"
>
Add Author
</a>
</div>
{% endblock %}
\ No newline at end of file
eldondagdag_reading/bookshelf/urls.py
View file @
c1b179a7
from
django.urls
import
path
from
.views
import
index_view
,
home
,
BookListView
,
BookDetailView
,
AuthorListView
,
AuthorDetail
View
from
.views
import
index_view
,
home
,
BookListView
,
BookDetailView
,
BookAddView
,
BookUpdateView
,
AuthorListView
,
AuthorDetailView
,
AuthorAddView
,
AuthorUpdate
View
urlpatterns
=
[
path
(
'home/'
,
home
,
name
=
'home'
),
path
(
'books/'
,
BookListView
.
as_view
(),
name
=
'books'
),
path
(
'books/add/'
,
BookAddView
.
as_view
(),
name
=
'add-book'
),
path
(
'books/<int:pk>/edit/'
,
BookUpdateView
.
as_view
(),
name
=
'edit-book'
),
path
(
'books/<int:pk>/details/'
,
BookDetailView
.
as_view
(),
name
=
'book-details'
),
path
(
'authors/'
,
AuthorListView
.
as_view
(),
name
=
'authors'
),
path
(
'authors/add/'
,
AuthorAddView
.
as_view
(),
name
=
'add-author'
),
path
(
'authors/<int:pk>/edit/'
,
AuthorUpdateView
.
as_view
(),
name
=
'edit-book'
),
path
(
'authors/<int:pk>/details/'
,
AuthorDetailView
.
as_view
(),
name
=
'author-details'
),
path
(
''
,
index_view
,
name
=
'index'
),
]
...
...
eldondagdag_reading/bookshelf/views.py
View file @
c1b179a7
from
django.shortcuts
import
render
from
django.http
import
HttpResponse
from
django.views
import
View
from
django.views.generic
import
ListView
,
DetailView
from
django.views.generic
import
ListView
,
DetailView
,
CreateView
,
UpdateView
from
.models
import
Author
,
Book
...
...
@@ -19,6 +19,16 @@ class BookDetailView(DetailView):
model
=
Book
template_name
=
'bookshelf/book_details.html'
class
BookAddView
(
CreateView
):
model
=
Book
fields
=
'__all__'
template_name
=
'bookshelf/add-book.html'
class
BookUpdateView
(
UpdateView
):
model
=
Book
fields
=
'__all__'
template_name
=
'bookshelf/edit-book.html'
class
AuthorListView
(
ListView
):
model
=
Author
template_name
=
'bookshelf/authors.html'
...
...
@@ -26,3 +36,13 @@ class AuthorListView(ListView):
class
AuthorDetailView
(
DetailView
):
model
=
Author
template_name
=
'bookshelf/author_details.html'
class
AuthorAddView
(
CreateView
):
model
=
Author
fields
=
'__all__'
template_name
=
'bookshelf/add-author.html'
class
AuthorUpdateView
(
UpdateView
):
model
=
Author
fields
=
'__all__'
template_name
=
'bookshelf/edit-author.html'
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