Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
T
trishamillena_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
Trisha Angel Millena
trishamillena_reading
Commits
3e5c3327
Commit
3e5c3327
authored
Mar 28, 2023
by
Trisha Angel Millena
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Edited urls.py under bookshelf
parent
920c1143
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
60 additions
and
3 deletions
+60
-3
author_details.html
...reading/bookshelf/templates/bookshelf/author_details.html
+9
-0
authors.html
...illena_reading/bookshelf/templates/bookshelf/authors.html
+9
-0
book_details.html
...a_reading/bookshelf/templates/bookshelf/book_details.html
+9
-0
books.html
...amillena_reading/bookshelf/templates/bookshelf/books.html
+9
-0
urls.py
trishamillena_reading/bookshelf/urls.py
+7
-1
views.py
trishamillena_reading/bookshelf/views.py
+17
-2
No files found.
trishamillena_reading/bookshelf/templates/bookshelf/author_details.html
0 → 100644
View file @
3e5c3327
{% extends 'base.html' %}
{% load static %}
{% block title %} {% endblock %}
{% block content %}
{% endblock %}
\ No newline at end of file
trishamillena_reading/bookshelf/templates/bookshelf/authors.html
0 → 100644
View file @
3e5c3327
{% extends 'base.html' %}
{% load static %}
{% block title %} {% endblock %}
{% block content %}
{% endblock %}
\ No newline at end of file
trishamillena_reading/bookshelf/templates/bookshelf/book_details.html
0 → 100644
View file @
3e5c3327
{% extends 'base.html' %}
{% load static %}
{% block title %} {% endblock %}
{% block content %}
{% endblock %}
\ No newline at end of file
trishamillena_reading/bookshelf/templates/bookshelf/books.html
0 → 100644
View file @
3e5c3327
{% extends 'base.html' %}
{% load static %}
{% block title %} {% endblock %}
{% block content %}
{% endblock %}
\ No newline at end of file
trishamillena_reading/bookshelf/urls.py
View file @
3e5c3327
from
django.urls
import
path
from
.
import
views
from
.views
import
(
index
,
BookListView
,
BookDetailView
,
AuthorListView
,
AuthorDetailView
)
urlpatterns
=
[
path
(
'home/'
,
views
.
home
,
name
=
'home'
),
path
(
'books/'
,
views
.
BooksListView
.
as_view
(),
name
=
'book-details'
),
path
(
'books/<int:pk>/details'
,
BookDetailView
.
as_view
(),
name
=
'book-details'
),
path
(
'authors/'
,
AuthorListView
.
as_view
(),
name
=
'author-list'
),
path
(
'author/<int:pk>/details'
,
AuthorDetailView
.
as_view
(),
name
=
'author-details'
),
]
app_name
=
"bookshelf"
\ No newline at end of file
trishamillena_reading/bookshelf/views.py
View file @
3e5c3327
from
django.http
import
HttpResponse
from
django.shortcuts
import
render
from
django.views
import
View
from
django.views.generic.list
import
ListView
from
django.views.generic.detatil
import
DetailView
from
.models
import
Author
,
Books
# Create your views here.
def
home
(
request
):
return
render
(
request
,
'bookshelf/home.html'
)
\ No newline at end of file
return
render
(
request
,
'bookshelf/home.html'
)
class
BookListView
(
ListView
):
model
=
Books
class
BookDetailView
(
DetailView
):
model
=
Books
class
AuthorListView
(
ListView
):
model
=
Author
class
AuthorDetailView
(
DetailView
):
model
=
Author
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