Skip to content

Commit

Permalink
🛠️ Fixed MarkDown parsing issue (Ebazhanov#3672)
Browse files Browse the repository at this point in the history
When a code block comes after a task list, it does not get parsed and appears like this ``` - [x] ``` so I added span tag after the task list to fix it.
  • Loading branch information
KhaledR57 authored May 17, 2022
1 parent f88cba8 commit 9eafefe
Showing 1 changed file with 22 additions and 19 deletions.
41 changes: 22 additions & 19 deletions django/django-quiz.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,34 +23,37 @@

#### Q4. A client wants their site to be able to load "Rick & Morty" episodes by number or by title—e.g., shows/3/3 or shows/picklerick. Which URL pattern do you recommend?

- [ ]

- [ ] <span>
```
url(r'shows/<int:season>/<int:episode>/', views.episode_number),
url(r'shows/<slug:episode_name>/', views.episode_name)
```
```

- [x]

- [x] <span>

```
path('shows/<int:season>/<int:episode>/', views.episode_number),
path(r'shows/<slug:episode_name>/', views.episode_name)
```

- [ ]
- [ ] <span>

```
path('shows/<int:season>/<int:episode>', views.episode_number),
path(r'shows/<slug:episode_name>/', views.episode_number)
```

- [ ]

- [ ] <span>

```
url(r'^show/(?P<season>[0-9]+)/(?P<episode>[0-9]+)/$', views.episode_number),
url(r'^show/(?P<episode_name>[\w-]+)/', views.episode_name
```


#### Q5. How do you determine at startup time if a piece of middleware should be used?

- [x] Raise MiddlewareNotUsed in the **init** function of your middleware.
Expand Down Expand Up @@ -130,7 +133,7 @@ url(r'^show/(?P<episode_name>[\w-]+)/', views.episode_name

#### Q17. How would you define the relationship between a star and a constellation in a Django model?

- [x]
- [x] <span>

```
class Star(models.Model):
Expand All @@ -139,7 +142,7 @@ class Constellation(models.Model):
stars = models.ManyToManyField(Star)
```

- [ ]
- [ ] <span>

```
class Star(models.Model):
Expand All @@ -148,7 +151,7 @@ class Constellation(models.Model):
stars = models.ForeignKey(Star, on_delete=models.CASCADE)
```

- [ ]
- [ ] <span>

```
class Star(models.Model):
Expand All @@ -157,7 +160,7 @@ class Constellation(models.Model):
stars = models.OneToManyField(Star)
```

- [ ]
- [ ] <span>

```
class Star(models.Model):
Expand Down Expand Up @@ -303,7 +306,7 @@ name = models.CharField(max_length=100)

#### Q37. How would you define the relation between a book and an author - book has only one author.

- [ ]
- [ ] <span>

```
class Author (models.model):
Expand All @@ -312,7 +315,7 @@ class Book(models.model):
name=models.charfield(max_length=100)
```

- [x]
- [x] <span>

```python
class Author (models.model):
Expand All @@ -321,7 +324,7 @@ class Book(models.model):
author=models.foreignkey(Author,on_delete=models.cascade)
```

- [ ]
- [ ] <span>

```
class Author (models.model):
Expand All @@ -330,7 +333,7 @@ class Book(models.model):
author=models.foreignkey(Author)
```

- [ ]
- [ ] <span>

```
class Author (models.model):
Expand All @@ -339,7 +342,7 @@ class Book(models.model):
author=models.foreignkey(Author,on_delete=models.cascade)
```

- [ ]
- [ ] <span>

```
class Author (models.model):
Expand Down Expand Up @@ -396,7 +399,7 @@ from rest_framework import serializers
from .models import Planet
```

- [x]
- [x] <span>

```
class PlanetSerializer(serializers.ModelSerializer):
Expand All @@ -405,7 +408,7 @@ model=Planet
fields=('name','position', 'mass', 'rings')
```

- [ ]
- [ ] <span>

```
from rest_framework import serializers
Expand All @@ -416,7 +419,7 @@ fields=('name','position', 'mass', 'rings')
model=Planet
```

- [ ]
- [ ] <span>

```
from django.db import serializers
Expand All @@ -426,7 +429,7 @@ fields=('name','position', 'mass', 'rings')
model=Sandwich
```

- [ ]
- [ ] <span>

```
from django.db import serializers
Expand Down

0 comments on commit 9eafefe

Please sign in to comment.