Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
M
migs_atienza_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
Migs Atienza
migs_atienza_reading
Commits
07b31f40
Commit
07b31f40
authored
Apr 30, 2023
by
Migs Atienza
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added add author html
parent
b80b35b6
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
2 deletions
+23
-2
urls.cpython-39.pyc
...atienza_reading/bookshelf/__pycache__/urls.cpython-39.pyc
+0
-0
views.cpython-39.pyc
...tienza_reading/bookshelf/__pycache__/views.cpython-39.pyc
+0
-0
add-author.html
...nza_reading/bookshelf/templates/bookshelf/add-author.html
+17
-0
urls.py
migs_atienza_reading/bookshelf/urls.py
+2
-1
views.py
migs_atienza_reading/bookshelf/views.py
+4
-1
No files found.
migs_atienza_reading/bookshelf/__pycache__/urls.cpython-39.pyc
View file @
07b31f40
No preview for this file type
migs_atienza_reading/bookshelf/__pycache__/views.cpython-39.pyc
View file @
07b31f40
No preview for this file type
migs_atienza_reading/bookshelf/templates/bookshelf/add-author.html
0 → 100644
View file @
07b31f40
{% extends 'base.html' %}
{% block title %}Add New Author{% endblock %}
{% block content %}
<center>
<form
action=
""
method=
"post"
>
{% csrf_token %}
<table>
{{ form.as_table }}
</table>
<input
type=
"submit"
value=
"Add Author"
/>
</form>
</center>
{% endblock %}
{% block links %}
<center><br/><br/><br/><br/><br/>
<a
href=
"/bookshelf/home"
>
Home
</a>
<a
href=
"/bookshelf/books"
>
Books
</a>
<a
href=
"/bookshelf/authors"
>
Authors
</a></center>
{% endblock %}
\ No newline at end of file
migs_atienza_reading/bookshelf/urls.py
View file @
07b31f40
from
django.urls
import
path
from
.views
import
index
,
home_view
,
BooksListView
,
BooksDetailView
,
BooksCreateView
,
AuthorsListView
,
\
AuthorsDetailView
AuthorsDetailView
,
AuthorsCreateView
urlpatterns
=
[
path
(
''
,
index
,
name
=
'index'
),
...
...
@@ -11,6 +11,7 @@ urlpatterns = [
path
(
'books/add'
,
BooksCreateView
.
as_view
(),
name
=
'add_book'
),
path
(
'authors'
,
AuthorsListView
.
as_view
(),
name
=
'authors_list'
),
path
(
'authors/<int:pk>/details'
,
AuthorsDetailView
.
as_view
(),
name
=
'authors_details'
),
path
(
'authors/add'
,
AuthorsCreateView
.
as_view
(),
name
=
'add_author'
),
]
app_name
=
"<bookshelf>"
...
...
migs_atienza_reading/bookshelf/views.py
View file @
07b31f40
...
...
@@ -41,5 +41,8 @@ class AuthorsDetailView(DetailView):
template_name
=
"bookshelf/authors_details.html"
class
AuthorsCreateView
(
CreateView
):
model
=
Author
fields
=
'__all__'
template_name
=
"bookshelf/add-author.html"
# Create your views here.
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