Fakultas Ilmu Komputer UI
Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Class Project
DIGIPUS
Commits
0af12bd8
Commit
0af12bd8
authored
Apr 05, 2020
by
Putu Agastya
Browse files
[GREEN] Implement basic view for daftar katalog.
parent
b27c06e1
Changes
5
Hide whitespace changes
Inline
Side-by-side
.vscode/launch.json
0 → 100644
View file @
0af12bd8
{
//
Use
IntelliSense
to
learn
about
possible
attributes.
//
Hover
to
view
descriptions
of
existing
attributes.
//
For
more
information
,
visit:
https://go.microsoft.com/fwlink/?linkid=
830387
"version"
:
"0.2.0"
,
"configurations"
:
[
{
"name"
:
"Python: Django test"
,
"type"
:
"python"
,
"request"
:
"launch"
,
"program"
:
"${workspaceFolder}
\\
manage.py"
,
"args"
:[
"test"
],
"django"
:
true
},
{
"name"
:
"Python: Django"
,
"type"
:
"python"
,
"request"
:
"launch"
,
"program"
:
"${workspaceFolder}
\\
manage.py"
,
"args"
:
[
"runserver"
,
"--noreload"
],
"django"
:
true
}
]
}
\ No newline at end of file
app/static/app/temp.js
0 → 100644
View file @
0af12bd8
app/templates/app/katalog_materi.html
0 → 100644
View file @
0af12bd8
{% extends "base.html" %}
{% block title %}Test pages{% endblock %}
<!-- {% block header %}
{% endblock header %} -->
{% block content %}
<div
class=
"container-fluid"
>
<div
class=
"row header"
>
<div
class=
"col"
>
<h2
class=
"title"
>
Temukan Materi Yang Kamu Mau!
</h2>
<p
class=
"description"
>
Cari dengan judul buku, penerbit, atau penulis
</p>
<form>
<div
class=
"form-group"
>
<input
type=
"email"
class=
"form-control"
placeholder=
"Tulis di sini"
>
</div>
</form>
</div>
</div>
<div
class=
"row content"
>
<div
class=
"col-3 sidebar"
>
<button
class=
"btn"
>
Filter
</button>
<button
class=
"btn"
>
Sort
</button>
</div>
<div
class=
"col-9 books"
>
<div
class=
"card book"
>
<img
src=
"https://scontent.fbdo6-2.fna.fbcdn.net/v/t1.0-9/60274038_2279638138757984_7988420823012605952_n.jpg?_nc_cat=108&_nc_sid=110474&_nc_oc=AQlRDnDhg1kJjuoXEwYCYWosatAaFqwSiZdMmfbX_ORoTXu7cvJoawUihJPCjHXCqr0&_nc_ht=scontent.fbdo6-2.fna&oh=169b2c36df1a49f6a394208f21d09f7b&oe=5E94FF4E"
class=
"card-img-top"
alt=
"cover"
></img>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
Wahyu
</h5>
<p
class=
"card-text"
>
Saul Andre Lumban Gaol
</p>
<button
class=
"btn btn-book"
>
Baca
</button>
<button
class=
"btn btn-book"
>
Detail
</button>
</div>
</div>
<div
class=
"card book"
>
<img
src=
"https://scontent.fbdo6-2.fna.fbcdn.net/v/t1.0-9/60274038_2279638138757984_7988420823012605952_n.jpg?_nc_cat=108&_nc_sid=110474&_nc_oc=AQlRDnDhg1kJjuoXEwYCYWosatAaFqwSiZdMmfbX_ORoTXu7cvJoawUihJPCjHXCqr0&_nc_ht=scontent.fbdo6-2.fna&oh=169b2c36df1a49f6a394208f21d09f7b&oe=5E94FF4E"
class=
"card-img-top"
alt=
"cover"
></img>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
Wahyu
</h5>
<p
class=
"card-text"
>
Saul Andre Lumban Gaol
</p>
<button
class=
"btn btn-book"
>
Baca
</button>
<button
class=
"btn btn-book"
>
Detail
</button>
</div>
</div>
<div
class=
"card book"
>
<img
src=
"https://scontent.fbdo6-2.fna.fbcdn.net/v/t1.0-9/60274038_2279638138757984_7988420823012605952_n.jpg?_nc_cat=108&_nc_sid=110474&_nc_oc=AQlRDnDhg1kJjuoXEwYCYWosatAaFqwSiZdMmfbX_ORoTXu7cvJoawUihJPCjHXCqr0&_nc_ht=scontent.fbdo6-2.fna&oh=169b2c36df1a49f6a394208f21d09f7b&oe=5E94FF4E"
class=
"card-img-top"
alt=
"cover"
></img>
<div
class=
"card-body"
>
<h5
class=
"card-title"
>
Wahyu
</h5>
<p
class=
"card-text"
>
Saul Andre Lumban Gaol
</p>
<button
class=
"btn btn-book"
>
Baca
</button>
<button
class=
"btn btn-book"
>
Detail
</button>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
app/urls.py
View file @
0af12bd8
...
...
@@ -2,6 +2,8 @@ from django.urls import path, re_path
from
app
import
views
urlpatterns
=
[
# Matches any html file
path
(
""
,
views
.
DaftarKatalog
.
as_view
(),
name
=
'daftar_katalog'
),
# Matches any html file
re_path
(
r
'^.*\.html'
,
views
.
pages
,
name
=
'pages'
),
]
\ No newline at end of file
app/views.py
View file @
0af12bd8
...
...
@@ -4,7 +4,14 @@ from django.http import HttpResponse, JsonResponse, HttpResponseRedirect
from
django.views.generic
import
TemplateView
class
DaftarKatalog
(
TemplateView
):
pass
template_name
=
"app/katalog_materi.html"
def
get_context_data
(
self
,
**
kwargs
):
return
super
().
get_context_data
(
**
kwargs
)
def
get
(
self
,
request
,
*
args
,
**
kwargs
):
context
=
self
.
get_context_data
(
**
kwargs
)
return
self
.
render_to_response
(
context
=
context
)
def
pages
(
request
):
context
=
{}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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