Commit 515e23f9 authored by Trisha Angel Millena's avatar Trisha Angel Millena

Edited urls.py: Added path(authors/add/), Edited add-author.html

parent a71efdd2
......@@ -5,16 +5,8 @@
{% block title %}Add New Author{% endblock %}
<form method = "POST">
{% csrf_token % }
{% for field in form%}
{% endform %}
{{ form.as_p }}
<input type = "submit" value = "Add Author" />
</form>
{% block content %}
{% endblock %}
from django.urls import path
from .views import (home, BooksListView, BooksDetailView, AuthorListView, AuthorDetailView, BooksCreateView)
from .views import (home, BooksListView, BooksDetailView, AuthorListView, AuthorDetailView, BooksCreateView, AuthorCreateView)
urlpatterns = [
path('home/', home, name = 'home'),
......@@ -9,6 +9,7 @@ urlpatterns = [
path('authors/<int:pk>/details', AuthorDetailView.as_view(), name = 'author-details'),
path('books/add/', BooksCreateView.as_view(), name = "add-book"),
path('authors/add/', AuthorCreateView.as_view(), name = "add-author"),
]
app_name = "bookshelf"
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment