-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updated model to prevent showing sleep errors and updated tests
- Loading branch information
1 parent
256015d
commit 41b9932
Showing
9 changed files
with
278 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Generated by Django 2.0.2 on 2018-02-03 19:53 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sleep', '0001_initial'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sleep', | ||
name='time_start_preparing_for_sleep', | ||
field=models.DateTimeField(blank=True, null=True, verbose_name='time started getting ready for bed'), | ||
), | ||
migrations.AlterField( | ||
model_name='sleep', | ||
name='time_went_into_bed', | ||
field=models.DateTimeField(blank=True, null=True, verbose_name='time in bed'), | ||
), | ||
migrations.AlterField( | ||
model_name='sleep', | ||
name='time_went_to_sleep', | ||
field=models.DateTimeField(blank=True, null=True, verbose_name='time asleep'), | ||
), | ||
migrations.AlterField( | ||
model_name='sleep', | ||
name='time_woke_in_morning', | ||
field=models.DateTimeField(blank=True, verbose_name='time woke in morning'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.0.2 on 2018-02-03 19:54 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sleep', '0002_auto_20180203_1953'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='sleep', | ||
name='time_woke_in_morning', | ||
field=models.DateTimeField(blank=True, null=True, verbose_name='time woke in morning'), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# Generated by Django 2.0.2 on 2018-02-05 23:11 | ||
|
||
from django.conf import settings | ||
from django.db import migrations, models | ||
import django.db.models.deletion | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
migrations.swappable_dependency(settings.AUTH_USER_MODEL), | ||
('sleep', '0003_auto_20180203_1954'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Participant', | ||
fields=[ | ||
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('individual_name', models.CharField(blank=True, max_length=100, null=True)), | ||
('age', models.IntegerField(blank=True, max_length=3, null=True)), | ||
('favourite_color', models.CharField(blank=True, max_length=60, null=True)), | ||
('login_user', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, to=settings.AUTH_USER_MODEL)), | ||
], | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
# Generated by Django 2.0.2 on 2018-02-05 23:12 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('sleep', '0004_participant'), | ||
] | ||
|
||
operations = [ | ||
migrations.AlterField( | ||
model_name='participant', | ||
name='age', | ||
field=models.IntegerField(blank=True, null=True), | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
.page-header { | ||
background-color: teal; | ||
margin-top: 0; | ||
padding: 20px 20px 20px 40px; | ||
} | ||
|
||
.page-header h1, .page-header h1 a, .page-header h1 a:visited, .page-header h1 a:active { | ||
color: #ffffff; | ||
font-size: 36pt; | ||
text-decoration: none; | ||
} | ||
|
||
.content { | ||
margin-left: 40px; | ||
} | ||
|
||
h1, h2, h3, h4 { | ||
font-family: 'lobster', cursive; | ||
} | ||
|
||
.date { | ||
color: #828282; | ||
} | ||
|
||
.save { | ||
float: right; | ||
} | ||
|
||
.post-form textarea, .post-form input { | ||
width: 100%; | ||
} | ||
|
||
.top-menu, .top-menu:hover, .top-menu:visited { | ||
color: #ffffff; | ||
float: right; | ||
font-size: 26pt; | ||
margin-right: 20px; | ||
} | ||
|
||
.post { | ||
margin-bottom: 70px; | ||
} | ||
|
||
.post h1 a, .post h1 a:visited { | ||
color: #000000; | ||
} | ||
|
||
h1 a { | ||
color: #FCA205; | ||
font-family: 'Lobster'; | ||
transition: .5; | ||
} | ||
|
||
body { | ||
padding-left: 15px; | ||
} | ||
|
||
.comment { | ||
margin: 20px 0px 20px 20px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{% load staticfiles %} | ||
<!Doctype: html> | ||
<html> | ||
<head> | ||
<title>SenSibDiary</title> | ||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css"> | ||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap-theme.min.css"> | ||
<link href="//fonts.googleapis.com/css?family=Lobster&subset=latin,latin-ext" rel="stylesheet" type="text/css"> | ||
<link rel="stylesheet" href="{% static 'css/sleep.css' %}"> | ||
</head> | ||
<body> | ||
<div class"page-header"> | ||
#<!-- TODO: Nav menu here for authenticated users --> | ||
<!-- TODO: Nav menu here for anonymous users / login redirect --> | ||
|
||
<h1><a href="/">SenSibDiary</a></h1> | ||
</div> | ||
<div class="content container"> | ||
<div class="row"> | ||
<div class="col-md-8"> | ||
{% blockcontent %} | ||
{% endblock%} | ||
</div> | ||
</div> | ||
</div> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters