Fakultas Ilmu Komputer UI
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
PMPL
Collection of Practice
2019
1606835595-practice
Commits
9c013268
Commit
9c013268
authored
Sep 18, 2019
by
Kevin Albert Simanjuntak
Browse files
Basic view now returns minimal HTML
parent
bc1242f3
Changes
5
Hide whitespace changes
Inline
Side-by-side
geckodriver.log
View file @
9c013268
...
...
@@ -81,3 +81,20 @@ JavaScript error: resource://activity-stream/lib/ActivityStreamPrefs.jsm, line 2
[GPU 10028, C
###!!! [Child][MessageChannel::SendAndWait] Error: Channel error: cannot send/recv
1568779358781 mozrunner::runner INFO Running command: "C:\\Program Files\\Mozilla Firefox\\firefox.exe" "-marionette" "-foreground" "-no-remote" "-profile" "C:\\Users\\KEVINS~1\\AppData\\Local\\Temp\\rust_mozprofileN4M45V"
1568779363445 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: mozillaAddons
1568779363446 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: telemetry
1568779363446 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: resource://pdf.js/
1568779363446 addons.webextension.screenshots@mozilla.org WARN Loading extension 'screenshots@mozilla.org': Reading manifest: Invalid extension permission: about:reader*
JavaScript error: resource://gre/modules/XULStore.jsm, line 66: Error: Can't find profile directory.
[Parent 9752, Gecko_IOThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Child 7312, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Parent 9752, Gecko_IOThread] WARNING: file z:/task_1566864336/build/src/ipc/chromium/src/base/process_util_win.cc, line 160
1568779409922 Marionette INFO Listening on port 61191
1568779410281 Marionette WARN TLS certificate errors will be ignored for this session
1568779417972 Marionette INFO Stopped listening on port 61191
JavaScript error: resource://gre/modules/UrlClassifierListManager.jsm, line 680: TypeError: this.tablesData[table] is undefined
[Parent 9752, Gecko_IOThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Parent 9752, Gecko_IOThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Child 13088, Chrome_ChildThread] WARNING: pipe error: 109: file z:/task_1566864336/build/src/ipc/chromium/src/chrome/common/ipc_channel_win.cc, line 341
[Child 13088, [GPU 9784, Chro
\ No newline at end of file
lists/__pycache__/tests.cpython-37.pyc
View file @
9c013268
No preview for this file type
lists/__pycache__/views.cpython-37.pyc
View file @
9c013268
No preview for this file type
lists/tests.py
View file @
9c013268
from
django.urls
import
resolve
from
django.test
import
TestCase
from
lists.views
import
home_page
from
django.http
import
HttpRequest
from
lists.views
import
home_page
class
HomePageTest
(
TestCase
):
def
test_root_url_resolves_to_home_page_view
(
self
):
found
=
resolve
(
'/'
)
self
.
assertEqual
(
found
.
func
,
home_page
)
\ No newline at end of file
found
=
resolve
(
'/'
)
self
.
assertEqual
(
found
.
func
,
home_page
)
def
test_home_page_returns_correct_html
(
self
):
request
=
HttpRequest
()
response
=
home_page
(
request
)
html
=
response
.
content
.
decode
(
'utf8'
)
self
.
assertTrue
(
html
.
startswith
(
'<html>'
))
self
.
assertIn
(
'<title>To-Do lists</title>'
,
html
)
self
.
assertTrue
(
html
.
endswith
(
'</html>'
))
\ No newline at end of file
lists/views.py
View file @
9c013268
from
django.
shortcuts
import
render
from
django.
http
import
HttpResponse
# Create your views here.
def
home_page
():
pass
\ No newline at end of file
def
home_page
(
request
):
return
HttpResponse
(
'<html><title>To-Do lists</title></html>'
)
\ No newline at end of file
Write
Preview
Supports
Markdown
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