summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKing2018-04-13 10:56:18 +0000
committerGitHub2018-04-13 10:56:18 +0000
commit93c16b0d5907b8e5d89c71ac422ea3bf8663cfb5 (patch)
tree8c6043858c7f1a26e51b17ea39babe2e9d42e984
parenta58b06d86779b0b0a8dc61b1e42a072e4f5c410b (diff)
downloadlearn_django-93c16b0d5907b8e5d89c71ac422ea3bf8663cfb5.tar.gz
learn_django-93c16b0d5907b8e5d89c71ac422ea3bf8663cfb5.tar.bz2
learn_django-93c16b0d5907b8e5d89c71ac422ea3bf8663cfb5.zip
Update slides.md
-rw-r--r--tutorial_6_django_shell_queries/slides.md8
1 files changed, 4 insertions, 4 deletions
diff --git a/tutorial_6_django_shell_queries/slides.md b/tutorial_6_django_shell_queries/slides.md
index 92ae0a4..954cbff 100644
--- a/tutorial_6_django_shell_queries/slides.md
+++ b/tutorial_6_django_shell_queries/slides.md
@@ -74,7 +74,7 @@ Now let's add a new blog
Explanation:
- We create an instance of Blog and add values to it's fields (name and creation date)
-- We then save the object, which means Django writes this information to the SQL table 'Blog'
+- We then save the object, which means Django writes this information to the database table 'Blog'
Now we access model field values via Python attributes.
@@ -117,9 +117,9 @@ Lets add a custom method to the blog model
def was_created_recently(self):
return self.created_on >= timezone.now() - datetime.timedelta(days=1)
-In shell:
+In the shell:
- >>> b2.was_created_recently()
+ >>> b.was_created_recently()
Demonstration [01:30 | 05:14]
--------------
@@ -140,7 +140,7 @@ Try sorting the Blog objects based on created_on year
>>> current_year = timezone.now().year
>>> Blog.objects.filter(created_on__year=current_year)
-Explanation: This query will give all the blog instances with created_on year
+Explanation: This query will give all the blog instances with created_on the current year
Demonstration [01:00 | 06:14]