Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update django-quiz.md #1816

Merged
merged 2 commits into from
Jul 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ if you want to meet each other or discuss quiz related problems join the `Discor
| [C++](c%2B%2B/c%2B%2Bquiz.md) | | => 62 questions | => 62 answers | |
| [C (Programming Language)](<c-(programming-language)/c-quiz.md>) | | => 28 questions | => 28 answers | [@makifay](https://github.com/makifay) |
| [CSS](css/css-quiz.md) | | => 77 questions | => 77 answers | |
| [Django](django/django-quiz.md) | | => 48 questions | => 48 answers | |
| [Django](django/django-quiz.md) | | => 51 questions | => 51 answers | |
| [.NET Framework](dotnet-framework/dotnet-framework-quiz.md) | | => 37 questions | => 37 answers | |
| [Eclipse](eclipse/eclipse-quiz.md) | | => 22 questions | => 15 answers | |
| [Front-end Development](front-end-development/front-end-development-quiz.md) | | => 44 questions | => 44 answers | [@vanekbr](https://github.com/vanekbr), [@ShankS3](https://github.com/ShankS3) |
Expand Down
22 changes: 22 additions & 0 deletions django/django-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -455,3 +455,25 @@ model=Planet
- [ ] Less Code
- [ ] Fast Development
- [x] Repeat Yourself

#### Q50. What is the result of this template code?
```
{{"live long and prosper"|truncate:3}}
```

- [x] live long and ...
- [ ] live long and
- [ ] a compilation error
- [ ] liv

#### Q51. When does this code load data into memory?
```
1 sandwiches = Sandwich.objects.filter(is_vegan=True)
2 for sandwich in sandwiches:
3 print(sandwich.name + " - " + sandwich.spice_level)
```

- [ ] line 1
- [x] It depends on how many results return by query.
- [ ] It depends on cache.
- [ ] line 2