Fakultas Ilmu Komputer UI

Commit 32b96fe8 authored by Muhammad Ilham Peruzzi's avatar Muhammad Ilham Peruzzi
Browse files

change some ft behaviour

parent 920f27bf
Pipeline #21270 failed with stages
in 43 seconds
......@@ -70,18 +70,7 @@ class NewVisitorTest(LiveServerTestCase):
# Now a new user, Francis, comes along to the site.
## We use a new browser session to make sure that no information
## of Edith's is coming through from cookies etc #
self.browser.quit()
chrome_options = Options()
chrome_options.add_argument('--dns-prefetch-disable')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--headless')
chrome_options.add_argument('disable-gpu')
try:
self.browser = webdriver.Chrome('./chromedriver.exe', chrome_options=chrome_options)
except:
self.browser = webdriver.Chrome('./chromedriver', chrome_options=chrome_options)
# Francis visits the home page. There is no sign of Edith's
# list
self.browser.get(self.live_server_url)
page_text = self.browser.find_element_by_tag_name('body').text
self.assertNotIn('Buy peacock feathers', page_text)
......
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2019-09-23 17:13
# Generated by Django 1.10.5 on 2019-09-29 17:08
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
......@@ -17,6 +18,18 @@ class Migration(migrations.Migration):
name='Item',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('text', models.TextField(default='')),
],
),
migrations.CreateModel(
name='List',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
),
migrations.AddField(
model_name='item',
name='list',
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='lists.List'),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2019-09-23 17:14
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lists', '0001_initial'),
]
operations = [
migrations.AddField(
model_name='item',
name='text',
field=models.TextField(default=''),
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2019-09-29 15:35
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('lists', '0002_item_text'),
]
operations = [
migrations.CreateModel(
name='List',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
],
),
]
# -*- coding: utf-8 -*-
# Generated by Django 1.10.5 on 2019-09-29 15:43
from __future__ import unicode_literals
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
('lists', '0003_list'),
]
operations = [
migrations.AddField(
model_name='item',
name='list',
field=models.ForeignKey(default=None, on_delete=django.db.models.deletion.CASCADE, to='lists.List'),
),
]
......@@ -18,7 +18,7 @@ def about_me():
def view_list(request, list_id):
list_ = List.objects.get(id=list_id)
return render(request, 'list.html', {'list': list_})
return render(request, 'list.html', {'list': list_,'bio':about_me()})
def new_list(request):
list_ = List.objects.create()
......
Supports Markdown
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